[Bug other/58133] New: GCC should emit arm assembly following the unified syntax
sven.koehler at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Aug 12 01:19:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58133
Bug ID: 58133
Summary: GCC should emit arm assembly following the unified
syntax
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: sven.koehler at gmail dot com
I'm not aware of any command line switch to make gcc generate unified syntax.
The asm code that gcc generated in thumb mode follows the old devided syntax.
All documentation by Atmel these days is about the unified syntax. Also,
binutils has decided to disassemble to unified syntax by default.
A code example and how to reproduce the issue is given below.
Command:
arm-softfloat-eabi-gcc -mcpu=arm7tdmi -O2 -mthumb -S -o - foo.c
Contents of foo.c:
int main() { return 0; }
Generated Assembly (devided syntax):
main:
mov r0, #0
bx lr
Disassembly (unified syntax):
00000000 <main>:
0: 2000 movs r0, #0
2: 4770 bx lr
According to the documentation, mov r0,#0 is not a valid 16bit command.
The documentation however assumes the unified syntax.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489i/Cihcdbca.html
It might be argued that the transition from classic to unified syntax is to
error-prone or too much work. For me, it causes some trouble. I will have to
switch between unified syntax and devided syntax in inline assembly since gcc
uses devided and clang uses unified syntax.
More information about the Gcc-bugs
mailing list