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] |
I am not expert, but your results points to to something strange in GCC. Other thing which is strict for EABI is 8 bytes alignment on the stack. But I am not sure if soft float arm7tdmi can be influenced by this problem. I think not, because it does not have 64 bit multimedia or FP registers and accesses as ARM5 and above. Other problem could some bug in parameters passing conventions. Does the problem appears in dtoa() case as well.
manl: 0 manh: 50000000 exp: 405 sign: 1
If there are some strange problems in varargs you can try
printf("a is %f\r\n", a); printf("fill %ld and a is %f\r\n", 1L, a); printf("fill %ld, %ld and a is %f\r\n", 1L, 2L, a); printf("fill %ld, %ld, %ld and a is %f\r\n", 1L, 2L, 3L, a);
These options should push passing of "a" out from parameters passed by registers.
Before flip: 00 00 00 00 00 00 55 c0 a is 0.000000 fill 1 and a is 3135806246969956017225324825[...] fill 1, 2 and a is 0.000000 fill 1, 2, 3 and a is 31352364387915649882790342116430[...]
After flip: 00 00 55 c0 00 00 00 00 a flipped is -84.000000 fill 1 and a flipped is 0.000000 fill 1, 2 and a flipped is -84.000000 fill 1, 2, 3 and a flipped is 313523477950794742515896974[...]
Your paste code doesnot include #include<stdio.h>. Vaargs should work even for functions without declarations, but I would not write code depending on that and elimination of this possibility should be right step.
You can test with other GCC release (4.4.x) as well.
Best regards, Jeppe
-- 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] |