PATCH: Fix sign-extension of bignums

Mark Mitchell mark@codesourcery.com
Wed Aug 11 03:09:00 GMT 2004


Alan Modra wrote:

>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.
>  
>
Thanks for the explanation!

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com



More information about the Binutils mailing list