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]

Re: asm clobbers, !SMALL_REGISTER_CLASSES patch.


>>>>> Richard Henderson writes:

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?

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

	SCRATCH only has a mode, but RTL match_scratch includes both a
mode and a register class constraint.  For instance some of the AIX
common-mode calls effectively are inlined assembly and are defined with

	(clobber (match_scratch:SI 0 "=l"))

and
	(clobber (match_scratch:CC 1 "=x"))

i.e., clobbering both the link register and the default fields of the CC
register.  I believe that these types of clobbers are what those writing
GCC inlined assembly would like to describe.

David



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