[llvm-bugs] [Bug 32432] New: [inline asm] structure with imm prefixes generate wrong asm

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 27 06:54:42 PDT 2017


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

            Bug ID: 32432
           Summary: [inline asm] structure with imm prefixes generate
                    wrong asm
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: ziv.izhar at intel.com
                CC: llvm-bugs at lists.llvm.org

typedef struct foo {
        float  a;
        double b;
} foo;

int main() {
        foo    x;
        __asm {lea eax, x
        fstp dword ptr 2[eax]foo.b
        };
}

Instead of generating fstp [eax + 0x0a] -> 2(imm) + 8(offset) we get 0x0c.
generally : a[eax]foo.b gives 2*a + offset(foo.b).

-- 
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/20170327/2b4719db/attachment.html>


More information about the llvm-bugs mailing list