This is the mail archive of the 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: Constraint modifier for partially overlaping operands

Ian Lance Taylor wrote:
> Andrew Hutchinson <andrewhutchinson@> writes:
>> I can use "=" modifier to make operands use same register and early
>> clobber "&" to avoid overlaps.
>> Is it possible to have or construct a contraint that permits partial
>> overlap operands. (which neither = or & would allow)
>> The case would be  wide types taking multiple hard registers.
>> eg Input r20..23 Output r22..25
> There is no such constraint today.  I suppose it would be possible to
> define such a constraint if it seemed useful.  

  Maybe I'm misunderstanding, but I thought that was already the default if
you use neither "=" to specify full overlap nor "&" for no overlap?

  Frex, a lot of ABIs specify that DImode values stored in pairs of SImode
registers must always use an odd-even register pair (using a test in
HARD_REGNO_MODE_OK), but when I was working on a custom port that allowed them
in any register pair, GCC would happily generate partially overlapping movdi
instructions such as (set:DI (reg:DI 5) (reg:DI 6)) (i.e., move r6/7 -> r5/6).
 This hasn't changed since 3.3, has it?


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