[LLVMbugs] [Bug 12926] New: Inline ARMv7 assembler
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed May 23 10:05:05 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12926
Bug #: 12926
Summary: Inline ARMv7 assembler
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: kuehnelf at comcast.net
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The armv7 architecture should be able to deal with the armv6t2 instruction set
for moving 16 bit values.
// current clang inline assembler bug for: /usr/local/bin/clang -march=armv7
-ccc-host-triple arm-apple-darwin11 -c test.c
#ifdef __arm__
int test(void) {
int val;
asm (
//"mov %[r0], #0xff \n\t" // old ARM way for 1023 constant
(works)
//"orr %[r0], %[r0], #0x300 \n\t"
"movw %[r0], #1023 \n\t" // new ARMv6T2 way for 16 bit wide
constants
"movt %[r0], #0 \n\t"
: [r0] "=r" (val)
);
return val;
}
#endif
Currently this results in an error:
test.c:8:7: error: instruction requires: armv6t2
"movw %[r0], #1023 \n\t" // new ARMv6T2 way for 16 bit wide
constants
^
<inline asm>:1:2: note: instantiated into assembly here
movw r0, #1023
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list