difference between xscale and iwmmxt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

--
best regards,
-Bridge

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux