This is the mail archive of the
mailing list for the GCC project.
Re: trivial rs6000 fix
Richard Sandiford wrote:
> Not a comment about this patch specifically -- the same construct is
> used all over the place, and it's unlikely that a simple test like this
> would get screwed up. I just thought I'd point it out because (a) I think
> we need a new function or macro to make these kinds of test and (b) the
> "right thing" is actually two characters shorter:
> #define SMALL_INT(X) ((unsigned HOST_WIDE_INT) INTVAL (X) + 0x8000 < 0x10000)
I think we should have a UINTVAL macro so that this would be:
UINTVAL (X) + 0x8000 < 0x10000
where UINTVAL (X) is (unsigned HOST_WIDE_INT) INTVAL (X)
A patch to add that is pre-approved for Stage 1, or, if anyone can
acutally find a regression because of this, earlier.
(650) 331-3385 x713