This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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
-- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |