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: Gabriel Dos Reis <gdr at codesourcery dot com>
- To: Richard dot Earnshaw at arm dot com
- Cc: Hans-Peter Nilsson <hp at bitrange dot com>, Richard Henderson <rth at redhat dot com>, gcc at gcc dot gnu dot org
- Date: 09 Jan 2002 12:06:34 +0100
- Subject: Re: rfc: clobber all call-saved registers
- Organization: CodeSourcery, LLC
- References: <200201091056.KAA08196@cam-mail2.cambridge.arm.com>
Richard Earnshaw <rearnsha@arm.com> writes:
| > 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.
I do like the idea. Any objection?
-- Gaby