This is the mail archive of the mailing list for the GCC project.

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

Re: Modes on CONST_INTs

> Date: Mon, 27 Nov 2000 15:38:38 -0800
> From: Geoff Keating <>

> > Date: Tue, 28 Nov 2000 00:14:33 +0100
> > From: Hans-Peter Nilsson <>

> > Not that that means the code is correct, of course.  Those
> > "unsigned" numbers appears *from the beginning* (in 00.rtl) as such,
> > not due to the twisty maze in combine.c -- it is actually combine
> > that produce the "correct" sign-extended numbers.
> This just means that the bug is in the rtl-emitting machinery.

I did not mean to imply otherwise.  It's right there in
immed_double_const (and trunc_int_for_mode).  I suggest you have
a look at <URL:>.

In summary, changing immed_double_const and trunc_int_for_mode
to do sign-extension as you suggest (and which seems right),
breaks sparc but works on ia32.  The sparc breakage seems
related to (compare X Y) not carrying a mode.

> The trees _do_ use non-sign-extended values to represent unsigned
> values, but they're supposed to be sign-extended when they are
> converted into RTL.

Then immed_double_const, which is responsible for that,
currently does not agree with you.  I have had no progress in
fixing it further than told in the "status dump" at the URL

brgds, H-P

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