This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: non-clobbering call insn
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Nick Burrett <nick dot burrett at btinternet dot com>
- Cc: gcc at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Date: Wed, 20 Nov 2002 10:43:34 +0000
- Subject: Re: non-clobbering call insn
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Hi,
>
> Is it possible to have a call insn that doesn't automatically clobber
> all the registers specified in CALL_USED_REGISTERS ? This would be
> useful for an explicit stack checking function, called from the function
> prologue, which always preserves the registers it uses rather than
> leaving it up to the caller to preserve the registers.
>
Better to use an unspec (or an unspec_volatile) for this type of thing.
Then you can explicitly clobber the registers you need to.
R.