This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Constraint modifier for partially overlaping operands
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: gcc-help at gcc dot gnu dot org
- Cc: Andrew Hutchinson <andrewhutchinson at cox dot net>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Sat, 17 Oct 2009 17:15:52 +0100
- Subject: Re: Constraint modifier for partially overlaping operands
- References: <4AD927C3.8030102@cox.net> <mcrk4yu5zfg.fsf@dhcp-172-17-9-151.mtv.corp.google.com>
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?
cheers,
DaveK