This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCC assmbler for powerpc-eabi
- From: Ian Lance Taylor <iant at google dot com>
- To: marian at jozep dot com dot au
- Cc: "John \(Eljay\) Love-Jensen" <eljay at adobe dot com>, Jeff Chimene <jchimene at gmail dot com>, GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 06 Apr 2009 22:04:22 -0700
- Subject: Re: GCC assmbler for powerpc-eabi
- References: <C5FFA77B.39EFB%eljay@adobe.com> <1239065496.7224.69.camel@beast>
marian <marian@jozep.com.au> writes:
> crxor 6,6,6 <<<< WHY <<<<<<
> bl sprintf
The various PPC ABIs are unreasonably complicated. The crxor
instruction is required by some of them. It is used when calling a
function which takes a variable number of arguments. crxor is used to
indicate that no floating point arguments were passed. creqv is used to
indicate that at least one floating point argument was passed. The
varargs function checks the condition register to see whether it has to
push the floating point parameter registers on the stack in order to let
va_arg work correctly.
Since most varargs functions do not have any floating point arguments,
it is usually a good tradeoff to have one exact instruction in the
caller to save several memory operations in the callee.
If you prefer a different tradeoff, you can fool with the -mcall-XXX
options.
Ian