This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/58133] New: GCC should emit arm assembly following the unified syntax
- From: "sven.koehler at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Aug 2013 01:19:12 +0000
- Subject: [Bug other/58133] New: GCC should emit arm assembly following the unified syntax
- Auto-submitted: auto-generated
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.