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]

RE: Fail to start blob with arm-iwmmxt-linux-gnueabi toolchain


On 03 July 2006 11:44, Bridge Wu wrote:

> Hello,
> 
> I built an arm-iwmmxt-linux-gnueabi toolchain and used it to build
> blob. But I found printf() cannot output number due to not 8-byte
> alignment to strd/ldrd instruction. This may be related to many
> aspects, I'm not clear. I reported the issue to arm-linux-toolchain
> and gcc mailing list with another title "SP must be 8 byte aligned on
> entry to AAPCS -conforming functions", no response so far.

  Sorry, yes, I saw that but didn't reply yet...
 
> The toolchain that I got has integrated iwmmxt.patch posted by Steven
> Newbury (attached). If I did not use this patch and built
> arm-none-linux-gnueabi toolchain. Then the printf() works well.
> 
> I was using "-march=iwmmxt -mcpu=iwmmxt -mabi=aapcs". With these
> options, arm-none-linux-gnueabi-gcc is fine, while
> arm-iwmmxt-linux-gnueabi-gcc is bad.
> 
> I checked the patch. It seemed some options make the difference. But I
> don't know which one make the difference. Does anybody make a
> clarification?


  Normally it's the job of the crt0 startup to make sure the sp is properly
aligned modulo 8, and the compiler assumes that and can make sure sp stays
aligned just by ensuring all stack frames are multiple of 8 bytes in size.  Is
your crt0 not aligning the sp correctly, or is the compiler emitting frames
that are not a multiple of 8 in size?  In the arm compiler's backend (v3.3.3,
gcc/config/arm.h) I see the line

#define PREFERRED_STACK_BOUNDARY (TARGET_ATPCS ? 64 : 32)

- does your compiler understand "-matpcs", and does it help?


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
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]