PATCH: Fix sign-extension of bignums
Alan Modra
amodra@bigpond.net.au
Wed Aug 11 03:07:00 GMT 2004
On Tue, Aug 10, 2004 at 07:27:03PM -0700, Mark Mitchell wrote:
> therefore makes it to emit_expr as an O_constant, we failed to
> sign-extend the value on output. It looks like we were trying to do
> that, but the test "exp->X_add_number < 0" makes no sense; that value
> should always be tested with "> 0" or "<= 0", and, furthermore, the "<
> 0" case would be for floating-point nubmers, which is not this case.
No. At this point X_add_number is part of an O_constant, so testing
for < 0 is correct. It's true that testing X_add_number with "> 0" or
"<= 0" is correct for O_big, but that's not what you have here.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list