* Using SCRATCH Register for a mov op,
@ 2002-10-30 8:46 Pierre Mallard
2002-10-31 17:06 ` Richard Henderson
0 siblings, 1 reply; 3+ messages in thread
From: Pierre Mallard @ 2002-10-30 8:46 UTC (permalink / raw)
To: gcc; +Cc: gcc-patches
Hi,
I'd like to use scratch reg for operation such as
reg X = mem(reg X) generated during the RELOAD PASS.
with X a number of a hard reg same for both side of
expression
Unfortunately it appears that a good means to obtain
the SCRATCH register from gcc is to use reload_in.
But this doesn't work in my proc cause I have no
different classes of regs (for me they are all
equivalent), I can't be able to define
SECONDARY_RELOAD_CLASS or things like this cause it
will abort if using same CLASS of regs ().
So I have no idea how to have a SCRATCH reg generated
with the op seen above.
Please Help Me
Regards
Pierre Mallard
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Using SCRATCH Register for a mov op,
2002-10-30 8:46 Using SCRATCH Register for a mov op, Pierre Mallard
@ 2002-10-31 17:06 ` Richard Henderson
0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2002-10-31 17:06 UTC (permalink / raw)
To: Pierre Mallard; +Cc: gcc, gcc-patches
On Wed, Oct 30, 2002 at 05:45:57PM +0100, Pierre Mallard wrote:
> I'd like to use scratch reg for operation such as
> reg X = mem(reg X) generated during the RELOAD PASS.
> with X a number of a hard reg same for both side of
> expression
You'll have to use a PARALLEL with a (clobber (match_scratch)).
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
* Using SCRATCH Register for a mov op,
@ 2002-11-07 7:30 Pierre Mallard
0 siblings, 0 replies; 3+ messages in thread
From: Pierre Mallard @ 2002-11-07 7:30 UTC (permalink / raw)
To: gcc-patches
Hi,
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
define_split.
But this leads to problem during the combine phase
(.cse) that create then unknow expression such as :
(parallel
(set (reg:Mode) (ashift:Mode (reg:Mode)(const_int)))
(clobber ("fixed reg")) Wich I don't want to catch in
define_insn template.
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
optimization!
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
need it!!
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-11-07 15:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-30 8:46 Using SCRATCH Register for a mov op, Pierre Mallard
2002-10-31 17:06 ` Richard Henderson
2002-11-07 7:30 Pierre Mallard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).