thumb2 support
Ian Lance Taylor
iant@google.com
Thu Oct 11 05:06:00 GMT 2012
On Wed, Oct 10, 2012 at 9:58 PM, Grant <emailgrant@gmail.com> wrote:
>>> Hello, I'm working with the BeagleBone and gcc-4.5.4 on Gentoo. If I
>>> try to compile the 3.6 kernel with CONFIG_THUMB2_KERNEL, I get:
>>>
>>> arch/arm/boot/compressed/head.S:127: Error: selected processor does
>>> not support requested special purpose register -- `mrs r2,cpsr'
>>> arch/arm/boot/compressed/head.S:134: Error: selected processor does
>>> not support requested special purpose register -- `mrs r2,cpsr'
>>> arch/arm/boot/compressed/head.S:136: Error: selected processor does
>>> not support requested special purpose register -- `msr cpsr_c,r2'
>>>
>>> This post indicates that mainline gcc does not currently support thumb2:
>>>
>>> https://groups.google.com/d/msg/beagleboard/P52fgMDzp8A/vupzuh71vdYJ
>>>
>>> However, this indicates that thumb2 has been supported since 4.3:
>>>
>>> http://gcc.gnu.org/gcc-4.3/changes.html
>>>
>>> Can anyone clear this up?
>>
>> The errors are coming from an assembler file that is not part of the
>> GCC sources. Are those instructions valid for Thumb2? I don't know.
>> If they are valid, then the issue is with the assembler, which is not
>> part of GCC; check the version of the GNU binutils that you have
>> installed. If those instructions are not valid, then you need to
>> change your source.
>
> Thanks Ian. I'm using binutils-2.22-r1. Do you happen to know which
> version of binutils should support thumb2?
That version should support thumb2.
If those instructions are valid for thumb2, make sure the assembler is
being invoked with the appropriate options. The error message says
"selected processor does not support" implying that you need to select
a different processor, probably via the assembler's -march option.
Ian
More information about the Gcc
mailing list