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]

Use of SECONDARY_RELOAD_REGISTER HELP PLEASE!!


Hi,
I'm trying to use SECONDARY_RELOAD_REGISTER to prevent
gcc from creating such expression :
(set (reg:Mode X) (mem:Mode(reg:Pmode X)))
Where X is the same for both arguments of SET.
This is because I need a scratch to register to
resolve properly this expression in assembly without
early clobbering the adress register by setting the
value in the first arg.

I tryed to directly generates a clobber fixed 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
define_split.
But this leads to problem with the combione phase
(.cse) that create then unknow expression such as :
(parallel
(set (reg:Mode) (ashift:Mode (reg:Mode)(const_int)))
(clobber ("fixed reg"))

Then I'm takig another direction by finally use
SECONDARY_RELOAD_CLASS.
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.!!!!

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 arg...

I really don't know what I can do then??
Thanks a lot for helping me
Regards 
Pierre

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com


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