This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Modes on CONST_INTs
- To: bernds at redhat dot com, gcc at gcc dot gnu dot org
- Subject: Re: Modes on CONST_INTs
- From: Jan Hubicka <jh at suse dot cz>
- Date: Mon, 27 Nov 2000 18:25:08 +0100
> > Ummm, as desirable as the change may be, I suspect we probably want to delay
> > doing this until after GCC 3.0 ships.
>
> Oh, I'm not suggesting we immediately make the constants have modes. The
> first steps should be purely adding infrastructure while still keeping
> VOIDmode for constants. Then, once all the dubious code has been cleaned
> up, we can make the switch. It may even be possible during a transition
> phase to add a target macro that says whether a port has been converted
> to use proper modes. Then we wouldn't have to update all the ports at
> once.
I would really like the first part (having all GEN_INT known mode) to be before
3.0. Some time ago I've commited an testcase that causes gcc to generate
CONST_INTs for values with mode shorter than HOST_WIDE_INT with trailing garbage
and then use them in the condition. Since condition loses it's mode during
compilation (both operands happends to be CONST_INT inside combiner), the
condition is missevaulated causing compilation error.
Having all CONST_INTs signextended would avoid risc of such problems, that
was present while back in the gcc on non-cc0 targets.
I really like idea of constant having modes too and in fact some time
ago I was proposing something similar. I would help with changing the
compiler if needed.
Honza