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]
Other format: [Raw text]

Re: RFC: constraint reshuffle for SH gcc target port


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


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