This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: constrain two register operands to be distinct
- To: Soubhik Bhattacharya <soubhik at cse dot iitk dot ac dot in>
- Subject: Re: constrain two register operands to be distinct
- From: Alan Lehotsky <alehotsky at cygnus dot com>
- Date: Mon, 26 Mar 2001 11:10:36 -0500
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- References: <Pine.LNX.4.21.0103261924470.13368-100000@cseproj22.cse.iitk.ac.in>
At 7:33 PM +0530 3/26/01, Soubhik Bhattacharya wrote:
>hi!!
>
>i'm trying to generate gcc machine description for some arbitrary
>target. is there a way to tell gcc that two operands of an 'insn', both
>being registers of same class, shud be distinct?
>
>any idea/ suggestion will be highly appreciated...
>
>thanks,
>soubhik.
Use a earlyclobber constraint '&' on the destination. (assuming that one of the register operands
is written. If they're both "read operands", I think you have to make some "artificial" subclasses
of registers (all the odds vs. all the evens?) and use them.