asm clobbers, !SMALL_REGISTER_CLASSES patch.
David Edelsohn
dje@watson.ibm.com
Fri Feb 13 10:58:00 GMT 1998
>>>>> Richard Henderson writes:
Richard> What if we provide a way to allocate scratches explicitly? My
Richard> thought here is to put something special in the () part of the
Richard> output section (whether we turn it into a clobber is immaterial;
Richard> we need a parameter number for the asm string). I considered
Richard> using something like __scratch__, but it'd be nice to avoid a
Richard> new keyword. Using auto instead appeals to me.
I agree that it would be nice to express regular scratch register
needs to GCC extended asm when no high-level language variable can
correspond to the class. This seems somewhat tangential to the clobber
field which breaks the symmetry of the other fields by mentioning
registers by name instead of using register classes. We still need to
extend register classes into the clobber domain; I would not want to have
to list artificial operands simply to clobber them.
Richard> although this is a bad example cause you could do the cmp+branch
Richard> thing in C around the blah. And doesn't ppc have separate fp and
Richard> int cc regs (4 each)? They don't seem to be given different
Richard> register classes...
Kenner did not distinguish the FP and FX CC registers, he just
considered the entire 32-bit collection of 4-bit fields killed. There are
some nice optimizations that GCC could do if it could perform full
register allocation on the individual 4-bit fields, but that has not
percolated up to the most important problem with the port.
David
More information about the Gcc
mailing list