This is the mail archive of the gcc@gcc.gnu.org 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 <geoffk@geoffk.org>

> > Date: Tue, 28 Nov 2000 00:14:33 +0100
> > From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>

> > 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:http://gcc.gnu.org/ml/gcc/2000-11/msg01123.html>.

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
above.

brgds, H-P

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