This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Fix sign-extension of bignums


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]