This is the mail archive of the
mailing list for the GCC project.
Re: Modes on CONST_INTs
- To: geoffk at redhat dot com
- Subject: Re: Modes on CONST_INTs
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Date: Tue, 28 Nov 2000 00:45:56 +0100
- CC: gcc at gcc dot gnu dot org
> Date: Mon, 27 Nov 2000 15:38:38 -0800
> From: Geoff Keating <firstname.lastname@example.org>
> > Date: Tue, 28 Nov 2000 00:14:33 +0100
> > From: Hans-Peter Nilsson <email@example.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