This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: reload reg
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: Pierre Mallard <pierremallard at yahoo dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 30 Oct 2002 21:55:54 +0000
- Subject: Re: reload reg
- Organization: SuperH UK Ltd.
> Working on gcc-3.0.4 for port to a cpu (12 bits) with
> int : QI. (long : HI) , ...
This won't give you an ISO C compliant implementation.
> My problem is that I don't want any
> (set (mem:HI (reg:HI x))(reg:HI x)) and
> (set (reg:HI x) (mem:HI (reg:HI x))) generated
> with x same REGNO reg.
For the second problem, there is an easy way to
avoid some - but not all - occurances:
make one earlyclobber alternative, and one that
is discouraged.
The first problem could be addressed by using multiple
alternatives, each of which use disjoint register classes
for input and output address, taking care to have an
alternative with reasonably sized register classes
for all operands first. Remember to check CLASS_LIKELY_SPILLED.
Another thing that you could try is to add a clobber to the
move, and use a matching constraint to say that the register
input is earlyclobbered, plus an alternative where the
clobbered destination is 'X', but which is discouraged.
--
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658