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: reload reg


> 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


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