bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GAS for ARM: does not support BX instruction for ARMv3 and lower


From: Sergey Belyashov
Subject: GAS for ARM: does not support BX instruction for ARMv3 and lower
Date: Mon, 6 Oct 2014 19:12:49 +0400

I try to compile program for ARMv3 or ARMv2 CPU target using GCC (4.8.x). It produces assembler code with BX LR instructions (return from function) which GAS (2.23.2) cannot compile:
   Error: selected processor does not support ARM mode `bx lr'
It is work for ARMv4 mode and greater (ARMv4 has no BX <reg> instruction support, but GAS compiles it as MOV PC,<reg>).

As I know BX <reg> is strongly recommended to be used instead of MOV PC,<reg> by the ARM architecture manual (section A.4.1.1).

Best regards,
Sergey Belyashov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]