Internal compiler error in `float_signal'
Herbert Xu
herbert@gondor.apana.org.au
Sat Sep 11 18:55:00 GMT 1999
reassign 33786 gcc
quit
On Sat, Jul 17, 1999 at 08:12:14AM -0300, Alexandre Oliva wrote:
>
> This bug occurs in an `idiv' instruction, dividing 0x80000000 by -1,
> just like in the following assembly code:
Firstly the bit of assembly that you showed didn't do what you meant.
This is closer to the division you had in mind
.text
.align 4
.globl main
.type main,@function
main:
movl $-1,%edx
movl $-2147483648,%eax
idiv %edx
ret
And the CPU has every right to generate a fault because the quotient
2147483648 is too big for %eax. It is clearly documented that all
divide overflows cause divide exceptions rather than setting the
overflow bit.
So there is no difference between this case and the compiler trying to
divide by zero. It should be fixed in egcs.
--
Debian GNU/Linux 2.1 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
More information about the Gcc-bugs
mailing list