This is the mail archive of the
mailing list for the GCC project.
Using SCRATCH Register for a mov op,
- From: Pierre Mallard <pierremallard at yahoo dot fr>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 7 Nov 2002 16:30:19 +0100 (CET)
- Subject: Using SCRATCH Register for a mov op,
My proc got
12 bit Register
An address is 24 bits long (2 register)
HImode stands for 24 bit value
SImode stands for 48 bit value
When gcc create such expression :
(set (reg:Mode X) (mem:Mode(reg:Pmode X)))
Where X is the same for both arguments of SET.
I need a scratch to register to resolve properly this
expression in assembly (the adress can be lost by
setting the value in X).
I tryed to directly generates a clobber reg in
movMode expression for all kind of arguments because
they may turn in reg or (mem(reg )) during reload pass
and then after give up unused clobber with a
But this leads to problem during the combine phase
(.cse) that create then unknow expression such as :
(set (reg:Mode) (ashift:Mode (reg:Mode)(const_int)))
(clobber ("fixed reg")) Wich I don't want to catch in
With SECONDARY_RELOAD_CLASS wich does not interest me
that much because I need only GENERAL REGS class for
all my regs it was worth
In order to do this I created two register classes ,
one with only one Pmode reg C1 and the other with the
rest of my register C2. I thought that then if he
wants to reload the first one C1 he will create a
scratch in C2 and C2 will get a C1 scratch.
But it appears that when he wants to reload C1 and
get C2 but just after will try C2 and get C1 ... ...
And here we go for an infinite loop.!!!!
I've set a define_peephole2 for creating a clobber
register with the set expression seen before and this
works just fine in all case ... except if u don't use
So I don't see any means to get this #?! scratch for
moving from mem to reg with adress in the same
register as the output... And I really really
I really don't know what I can do then??
Thanks a lot for helping me
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en franšais !
Yahoo! Mail : http://fr.mail.yahoo.com