This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Fix sign-extension of bignums
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 11 Aug 2004 12:37:48 +0930
- Subject: Re: PATCH: Fix sign-extension of bignums
- References: <200408110227.i7B2R38i015153@sirius.codesourcery.com>
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