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

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to