This is the mail archive of the mailing list for the newlib project.

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: arm-elf thumb-2 issue in newlib or gas? wrote:
>> Hello 
>> I configure arm-elf with thumb-2 support but ran into problem when I came
>> Newlib
>>   $ ../newlib-1.16.0/configure --target=arm-elf
>> --prefix=/proj/crossgcc/arm-elf --disable-nls
>> --disable-newlib-supplied-syscalls --disable-newlib-mb
>> --disable-newlib-io-pos-args --disable-newlib-io-long-long
>> --disable-newlib-io-long-double --disable-newlib-iconv
>> --enable-newlib-multithread
>> arm-elf-gcc
>> -B/proj/buildcross/build/build_newlib/arm-elf/thumb/thumb2/newlib/
>> -isystem /proj/buildcross/build/newlib-1.16.0/newlib/libc/include
>> -B/proj/buildcross/build/build_newlib/arm-elf/thumb/thumb2/libgloss/arm
>> -L/proj/buildcross/build/newlib-1.16.0/libgloss/arm  -mthumb -march=armv7
>> -O2 -D__NO_SYSCALLS__ -fno-builtin   -mthumb -march=armv7 -c -o
>> lib_a-setjmp.o `test -f 'setjmp.S' || echo
>> '../../../../../../../../newlib-1.16.0/newlib/libc/machine/arm/'`setjmp.S
>> ../../../../../../../../newlib-1.16.0/newlib/libc/machine/arm/setjmp.S:
>> Assembler messages:
>> Error: SP not allowed in register list -- `stmea a1!,{v1-v7,fp,ip,sp,lr}'
>> Error: SP not allowed in register list -- `ldmfd a1!,{v1-v7,fp,ip,sp,lr}'
>> make[9]: *** [lib_a-setjmp.o] Error 1
>> make[9]: Leaving directory
>> `/proj/buildcross/build/build_newlib/arm
>> e/arm'
>> What is the correct solution, what I can see it is an issue in either
>> setjmp.S using SP or the gas function triggering error for SP,  or im a
>> missing something else? 

>Nope, that seems to be about right. I would suggest you post to the gcc 
>list to see if the error is correct for the given compiler arguments. 
>There are __thumb__ and __thumb2__ flagged sections already in setjmp.S 
>and the particular insns above are not singled out.

OK, cause I first read this report in and they place the
problem in binutils or newlib. 

And when you look in gas\config\tc-arm.c it is special thumb-2 function
generating the error

/* Helper function used for both push/pop and ldm/stm.  */
static void
encode_thumb2_ldmstm (int base, unsigned mask, bfd_boolean writeback)


  if (mask & (1 << 13))
    inst.error =  _("SP not allowed in register list");

and if we're running 32-bit thumb-2 instruction that is true, SP can't be in
the list. 

regards andreas

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]