This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: rfc: clobber all call-saved registers
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: Richard Henderson <rth at redhat dot com>, gcc at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Date: Wed, 09 Jan 2002 10:56:06 +0000
- Subject: Re: rfc: clobber all call-saved registers
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> 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.
Rather than creating loads of builtins that do lots of randomly different
things, how about a __builtin_diagnostic(type,...) that can be used for a
whole slew of these. Clearly these shouldn't be used anywhere outside
testing the compiler, and we can even keep the public documentation down
to a minimum.
R.