http://llvm.org/bugs/show_bug.cgi?id=15211

            Bug ID: 15211
           Summary: Clang doesn't react to some constraints in inline asm
                    instructions
           Product: clang
           Version: 3.2
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

We can write simple test:

void f() {
    register int in asm("ebx") = 0;
    __asm("test %h0, %h0" : : "A"(in)); 
}

and watch clang's assembler for it.
We will see:

        movl    $0, -12(%rbp)
        movl    -12(%rbp), %ebx
        ## InlineAsm Start
        test %bh, %bh
        ## InlineAsm End

But constraint "A" says, that input parameter must be placed in eax.
Other constraints have the same errors.




--
Software Engineer
Intel Compiler Team
Intel Corp.

-- 
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