rfc: clobber all call-saved registers

Hans-Peter Nilsson hp@bitrange.com
Tue Jan 8 17:39:00 GMT 2002


On Tue, 8 Jan 2002, Richard Henderson wrote:
> I hate creating platform specific tests for potentially generic
> problems, since the problem is bound to show up somewhere else
> as well.  So what to do?  I can think of two options:
>
> (1) A header file somewhere in the testsuite that has a whole
>     whale-load of ifdefs and chooses the correct asm statement,
>
> (2) A compiler builtin that generates the correct asm statement
>     based on the contents of call_used[].
>
> Thoughts?

A trick question?  A built-in would solve the problem once and
for all targets, new and old, it seems.  If you think a
"self-serving" built-in looks bad, consider there are several
EH-builtins with very limited use.  Right, the test-suite isn't
a run-time library, but simplified test-cases are IMHO just as
important.

I think there are different needs: call_used, non-call_used and
all registers clobbered.  Perhaps others.

brgds, H-P



More information about the Gcc mailing list