Mail Archives: djgpp/1992/07/03/01:13:05
>>the code. Hopefully gcc 2.2.2 (which I'm working on compiling now)
>>will work correctly.
>>
>>DJ
Yes, I have compiled gcc-2.2.2 and it works correctly for long long shift.
i386.md in gcc-2.1 had some problems but almost all are fixed in
gcc-2.2.
The assembly output from gcc-2.2.2 is shown below.
.file "tbug.c"
gcc2_compiled.:
.text
LC0:
.ascii "%lf\0"
LC1:
.ascii "%f/n\0"
.align 2
.globl _main
_main:
pushl %ebp
movl %esp,%ebp
subl $8,%esp
pushl %esi
pushl %ebx
call ___main
movl $1,%ebx
movl $0,%esi
leal -8(%ebp),%eax
pushl %eax
pushl $LC0
call _scanf
addl $8,%esp
movl %ebx,%eax
movl %esi,%edx
movl %eax,%edx
xorl %eax,%eax
sall $3,%edx
pushl %edx
pushl %eax
fildq (%esp)
addl $8,%esp
fdivrl -8(%ebp)
fstl -8(%ebp)
subl $8,%esp
fstpl (%esp)
pushl $LC1
call _printf
leal -16(%ebp),%esp
popl %ebx
popl %esi
leave
ret
Faculty of Eng., Mi'e Univ., Tsu, Japan.
na70103 AT mips DOT cc DOT mie-u DOT ac DOT jp Makoto Kobayashi
- Raw text -