[LLVMbugs] [Bug 11045] New: clang does not support "o" inline asm constraint
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Sep 30 16:08:24 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=11045
Summary: clang does not support "o" inline asm constraint
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nlewycky at google.com
CC: llvmbugs at cs.uiuc.edu, rikka at google.com
The definition of the "o" constraint is "A memory operand is allowed, but only
if the address is offsettable. This means that adding a small integer
(actually, the width in bytes of the operand, as determined by its machine
mode) may be added to the address and the result is also a valid memory
address."
Testcase:
void test() {
char tmp[256];
__asm__ volatile(
"movl 1+%0, %%eax"
:
:"o"(tmp[128]));
}
Here, tmp[128] maps to "(%rsp)" producing "movl 1+(%rsp), %eax", so that fails.
--
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