another bug
H.J. Lu
hjl@lucon.org
Mon Dec 15 20:55:00 GMT 1997
>
> Hi,
>
> I think I found another bug which was introduced in egcs by the gcc
> 2.8 merge. So this might also effect gcc 2.8. I sincerely hope that
> none of my modifications to my local gcc repository caused this
> problem.
>
It looks like an egcs bug since gcc 2.8.0 is ok. Here is
the output.
H.J.
---
.file "e_hypotf.i"
.version "01.01"
/ GNU C version 2.8.0 (i586-unknown-linux-gnulibc1) compiled by GNU C version 2.8.0.
/ options passed: -momit-leaf-frame-pointer -O3 -fPIC
/ options enabled: -fdefer-pop -fomit-frame-pointer -fcse-follow-jumps
/ -fcse-skip-blocks -fexpensive-optimizations -fthread-jumps
/ -fstrength-reduce -fpeephole -fforce-mem -ffunction-cse
/ -finline-functions -finline -fkeep-static-consts -fcaller-saves
/ -fpcc-struct-return -frerun-cse-after-loop -fschedule-insns2 -fPIC
/ -fcommon -fverbose-asm -fgnu-linker -m80387 -mhard-float -mno-soft-float
/ -mieee-fp -mfp-ret-in-387 -momit-leaf-frame-pointer -mschedule-prologue
/ -mcpu=pentium -march=pentium
gcc2_compiled.:
.section .rodata
.align 4
.LC0:
.long 0x3f000000
.text
.align 4
.globl __ieee754_hypotf
.type __ieee754_hypotf,@function
__ieee754_hypotf:
pushl %esi
pushl %ebx
call .L81
.L81:
popl %ebx
addl $_GLOBAL_OFFSET_TABLE_+[.-.L81],%ebx
movl 8(%esp),%ecx
andl $2147483647,%ecx
movl 12(%esp),%edx
andl $2147483647,%edx
cmpl %ecx,%edx
jle .L12
movl %ecx,%eax
movl %edx,%ecx
movl %eax,%edx
.L12:
pushl %ecx
flds (%esp)
addl $4,%esp
pushl %edx
flds (%esp)
addl $4,%esp
movl %ecx,%eax
subl %edx,%eax
cmpl $251658240,%eax
jle .L21
faddp %st,%st(1)
jmp .L72
.align 4
.L21:
xorl %esi,%esi
cmpl $1484783616,%ecx
jle .L22
cmpl $2139095039,%ecx
jle .L76
fld %st(1)
fadd %st(1),%st
cmpl $2139095040,%ecx
jne .L77
fstp %st(0)
jmp .L24
.align 4
.L77:
fstp %st(2)
.L24:
cmpl $2139095040,%edx
jne .L80
fstp %st(1)
jmp .L72
.align 4
.L76:
fstp %st(0)
fstp %st(0)
addl $-1568669696,%ecx
addl $-1568669696,%edx
movl $60,%esi
pushl %ecx
flds (%esp)
addl $4,%esp
pushl %edx
flds (%esp)
addl $4,%esp
.L22:
cmpl $645922815,%edx
jg .L34
cmpl $8388607,%edx
jg .L79
testl %edx,%edx
je .L80
flds .LC0@GOTOFF(%ebx)
fmul %st,%st(1)
addl $-126,%esi
fmulp %st,%st(2)
jmp .L34
.align 4
.L79:
fstp %st(0)
fstp %st(0)
addl $1568669696,%ecx
addl $1568669696,%edx
addl $-60,%esi
pushl %ecx
flds (%esp)
addl $4,%esp
pushl %edx
flds (%esp)
addl $4,%esp
.L34:
fld %st(1)
fsub %st(1),%st
fcom %st(1)
fnstsw %ax
andb $69,%ah
jne .L50
fstp %st(0)
movl %ecx,%eax
andl $-4096,%eax
pushl %eax
flds (%esp)
addl $4,%esp
fld %st(2)
fld %st(2)
fchs
fxch %st(1)
fsub %st(2),%st
fxch %st(4)
fadd %st(2),%st
fxch %st(1)
fmulp %st,%st(3)
fmulp %st,%st(3)
fld %st(0)
fmulp %st,%st(1)
fxch %st(1)
fsubp %st,%st(2)
fsubp %st,%st(1)
jmp .L75
.align 4
.L50:
fxch %st(2)
fadd %st(0),%st
movl %edx,%eax
andl $-4096,%eax
pushl %eax
flds (%esp)
addl $4,%esp
fld %st(2)
fsub %st(1),%st
leal 8388608(%ecx),%eax
pushl %eax
flds (%esp)
addl $4,%esp
fld %st(0)
fmulp %st,%st(3)
fmul %st,%st(1)
fsubrp %st,%st(3)
fld %st(4)
fchs
fxch %st(3)
fmulp %st,%st(4)
fxch %st(2)
fmulp %st,%st(4)
fxch %st(1)
faddp %st,%st(2)
fxch %st(2)
fsubp %st,%st(1)
fsubrp %st,%st(1)
.L75:
#APP
fsqrt
#NO_APP
testl %esi,%esi
je .L72
movl %esi,%eax
sall $23,%eax
addl $1065353216,%eax
pushl %eax
flds (%esp)
addl $4,%esp
fmulp %st,%st(1)
jmp .L72
.align 4
.L80:
fstp %st(0)
.L72:
popl %ebx
popl %esi
ret
.Lfe1:
.size __ieee754_hypotf,.Lfe1-__ieee754_hypotf
.ident "GCC: (GNU) 2.8.0"
More information about the Gcc
mailing list