This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PPC440, GCC-4.1.1 supposes cr{2,3,4} saved but the hard real time kernel doesn't...
- From: Ian Lance Taylor <iant at google dot com>
- To: Etienne Lorrain <etienne_lorrain at yahoo dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: 28 Nov 2006 07:26:27 -0800
- Subject: Re: PPC440, GCC-4.1.1 supposes cr{2,3,4} saved but the hard real time kernel doesn't...
- References: <20061128151406.93062.qmail@web26906.mail.ukl.yahoo.com>
Etienne Lorrain <etienne_lorrain@yahoo.fr> writes:
> My problem is quite simple, the PPC has few conditions registers and some are assumed to be saved over function calls (in my test case NU_Sleep()), but the hard real time kernel do not save those (partial flags) registers.
> This behaviour is perfectly documented in gcc-4.1.1/gcc/config/rs6000 line 709, but is there a simple solution (maybe involving recompiling the compiler) to force re-testing values after function calls?
> I do remember the i386 option -mreg-alloc="dacbSDB", but it does not seem to be supported for PPC; the best would be a compiler option to say "full CC register clobber by function call".
You want the -fcall-used-REG option. See the documentation.
Ian