This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: constraint reshuffle for SH gcc target port
- From: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: gcc at gcc dot gnu dot org
- Cc: Richard dot Earnshaw at arm dot com, joern dot rennecke at superh dot com, kkojima at gcc dot gnu dot org, aoliva at redhat dot com, toshiyasu dot morita at hsa dot hitachi dot com, stephen dot clarke at st dot com, corsepiu at faw dot uni-ulm dot de, joel dot sherrill at OARcorp dot com, linuxsh-shmedia-dev at lists dot sourceforge dot net, linux-sh at m17n dot org
- Date: Sun, 15 Jun 2003 10:22:12 +0900
- Subject: Re: RFC: constraint reshuffle for SH gcc target port
- References: <200306141311.h5EDBuH31776@pc960.cambridge.arm.com>
Richard Earnshaw <rearnsha@arm.com> wrote:
>> The gcc.dg/compat/scalar-return-4 c_compat_x_tst.o compile failure
>> is yet another of these little bugs that can be easily solved with
>> another constraint - but there are more problems like this, the SH
>> port is already very low on free constraint letters, and the existing
>> constraint letters are also somewhat haphazard. For instance, the
>> 'Z' constraint really belongs into the CONST_OK_FOR_CONSTRAINT space,
>> but it didn't fit there because all the letters had been used up.
>> Thus, I think it is time to reshuffle some constraints to get some
>> more order in the existing constraints and make room for new ones.
>> This will affect assembler templates that use any of the renamed
>> constraints. I have attached an outline of the existing usage of
>> uppercase constraint letters (lowercase letters that are not defined
>> in a machine-independent way are used for register classes on the SH),
>> what constraints I want to change, and list of the uppercase constraints
>> after the reshuffle.
>>
>
> Doesn't this break any constraints in asm statements that use the
> constraint letters you are changing?
I've grepped asm constraints in sh/shmedia libc and linux kernel
and found no [A-Z] constrains. Of course user applications could
use them, but it seems to me a rare case and would be fixed easily.
Perhaps it would be better the compiler can detect the old style
constraints and make them error. Since in the proposal, the only
remapped constraint which is also valid as an original constraint
is "Z", changing it to "Zam" or something like that makes such
detection easy.
Regards,
kaz