asm clobbers, !SMALL_REGISTER_CLASSES patch.

Richard Henderson rth@cygnus.com
Fri Feb 13 02:28:00 GMT 1998


On Thu, Feb 12, 1998 at 11:10:32PM -0500, David Edelsohn wrote:
> 	This is a good effort and I am glad that you are continuing to
> pursue this needed feature, but I am curious why you are choosing to
> implement it this way instead of as a match_scratch of the appropriate
> register class?

A SCRATCH only has a mode, not a register class.  There is nowhere to
set a register class except in the output constraint of an asm_output.
So the obvious (clobber (scratch:XX )) doesn't do the trick.

Of course, why 

+                          gen_reg_rtx(reg_raw_mode[regno]),

instead of

+                          gen_rtx_SCRATCH (reg_raw_mode[regno]),

I don't know.

And in the PowerPC example, isn't the problem that you're clobbering
CC, which wants an input of CCmode?  It is still technically possible
to get these cases with

  (clobber (match_scratch:XX))

in which GET_MODE_CLASS(XX) is MODE_CC or MODE_RANDOM.  Whether it is
worth the additional hastle while solving the larger problem I don't
know.


r~



More information about the Gcc mailing list