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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to