Hi Bridge
I think there should be no differences in calling convention if you are
configuring toolchain with EABI.
with Old ABI there may be differences because iwmmxt has it own ABI
which was different.
Thanks
Khem
Bridge Wu said the following on 9/6/2006 7:53 PM:
Hello,
It seems -mcpu=xscale and -mcpu=iwmmxt not only mean for different
target, but also mean different calling convention. E.g, look at issue
below.
I built an arm linux tool chain with gcc-3.4.3, glibc-2.3.2 and
binutils-2.14.90.0.7 by using crosstool. I set
GCC_EXTRA_CONFIG="--with-cpu=iwmmxt --enable-cxx-flags=-mcpu=iwmmxt".
% cat floattest.c
#include <stdio.h>
int main()
{
float a;
printf("%f\n", 1.0/3.0);
return 0;
}
% arm-linux-gcc floattest.c -mcpu=xscale
The result is wrong.
% arm-linux-gcc floattest.c
% arm-linux-gcc floattest.c -mcpu=iwmmxt
Both the results are correct.
Look at the generated assembly code, I find "ldmia r1, {r1, r2}" is
used before invoking printf() with -mcpu=xscale, while "ldmia r2,
{r2, r3}" is used with -mcpu=iwmmxt. It shows these two options have
different calling convention.
Then which PCS (procedure call standard) do xscale and iwmmxt follow
up respectively? Are there any clues to this?
--
Khem Raj <kraj@xxxxxxxxxx>
MontaVista Software Inc.