[llvm-bugs] [Bug 33615] New: [inline asm; x86] regression in support of "A" constraint, selecting rax instead of eax

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 27 09:45:21 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=33615

            Bug ID: 33615
           Summary: [inline asm; x86] regression in support of "A"
                    constraint, selecting rax instead of eax
           Product: new-bugs
           Version: 4.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: eric.schweitz at pgroup.com
                CC: llvm-bugs at lists.llvm.org

int a,b,x;

int test() {
    asm ( 
        "movl    %1,%0;"
        "addl   %2,%0"
        : "=A" (x) : "D" (a), "S" (b) );
}

This compiles with clang 3.9, but not with clang 4.0.

foo.c:22:2: error: invalid operand for instruction
        "movl    %1,%0;"
        ^
<inline asm>:1:15: note: instantiated into assembly here
        movl    %edi,%rax;addl  %esi,%rax
                     ^~~~~
foo.c:22:2: error: invalid operand for instruction
        "movl    %1,%0;"
        ^
<inline asm>:1:30: note: instantiated into assembly here
        movl    %edi,%rax;addl  %esi,%rax
                                     ^~~~
2 errors generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170627/ee1fe1ff/attachment.html>


More information about the llvm-bugs mailing list