gas will miscompile with SPARCompiler 3.0.1 on Solaris7
Alexandre Oliva
aoliva@cygnus.com
Thu Apr 6 19:44:00 GMT 2000
[back to the list]
On Apr 6, 2000, Alan Modra <alan@linuxcare.com.au> wrote:
> It's either from line 3026 of gas/config/tc-sparc.c, or line 971 of
> gas/write.c Maybe you could change one (or both, to make sure I know
> what I'm talking about!) of the error messages to see which it is?
Instead, I run it within a debugger and found out it was in line 3026
of gas/config/tc-sparc.c.
The problem is in in_signed_range(). bfd_signed_vma is `long long',
whose size is 8 bytes. When it does:
/* Sign-extend the value from the architecture word size, so that
0xffffffff is always considered -1 on sparc32. */
if (sparc_arch_size == 32)
{
bfd_signed_vma sign = (bfd_signed_vma)1 << 31;
val = ((val & 0xffffffff) ^ sign) - sign;
}
val, that was -112ll, becomes -4294967408ll, which certain doesn't fit
in 13 bits. Jakub, it seems that you are responsible for having
introduced this change, back in Sept 1998. Do you still remember why
it was necessary? Can't we just remove it?
--
Alexandre Oliva Enjoy Guaraná, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me
More information about the Binutils
mailing list