This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: [Fwd: Building newlib for arm - setjmp.S and thumb?]
- To: kurt at qdusa dot com
- Subject: Re: [Fwd: Building newlib for arm - setjmp.S and thumb?]
- From: "J. Johnston" <jjohnstn at cygnus dot com>
- Date: Thu, 29 Mar 2001 20:00:22 -0500
- CC: newlib at sourceware dot cygnus dot com
- Organization: Red Hat Inc.
- References: <3AC2A1D8.9D138EEE@cygnus.com> <p0puf0ksf2.fsf@elmo.cygnus.com>
Nick Clifton wrote:
>
> Hi Kurt,
>
> > ../../../../../../../newlib-1.9.0/newlib/libc/sys/arm/setjmp.S:
> > Assembler messages:
> > ../../../../../../../newlib-1.9.0/newlib/libc/sys/arm/setjmp.S:97:
> > Error: r15 not allowed here
> > ../../../../../../../newlib-1.9.0/newlib/libc/sys/arm/setjmp.S:117:
> > Error: r15 not allowed here
>
> Hmm, these messages appear to be for the FUNC_START macro. The Thumb
> version of this macro uses the code sequence:
>
> BX PC
> NOP
>
> to switch into ARM mode.
>
>
> The reason that the assembler is confused, and thinks that it is in
> ARM mode is that the .thumb_func directive in the 2.10.1 assembelr
> sources did not automatically select thumb mode. You can easily work
> around this by editing the setjmp.S source file and changing:
>
> .macro PROLOGUE name
> bx pc
> nop
> .code 32
> to:
>
> .macro PROLOGUE name
> .code 16 <---- added line
> bx pc
> nop
> .code 32
>
I have checked the patch in.
-- Jeff J.