[llvm-bugs] [Bug 32101] New: [inline asm][ms compatability] structure syntax support

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 1 06:28:59 PST 2017


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

            Bug ID: 32101
           Summary: [inline asm][ms compatability] structure syntax
                    support
           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

Consider this:
typedef struct foo {
        float  a;
        double b;
} foo;
int main() {
        foo    x;
        __asm {lea eax, x
        };
}

microsoft allows the following syntaxes for structures:
fstp foo[eax].b (evaluates it to be eax+b_offset)
fstp x[eax].b (evaluates it to be x+eax+b_offset)
fstp x.b[eax] (evaluates it to be eax+b_offset)
fstp foo.b[eax] (evaluates it to be eax+b_offset)
fstp [eax].b (as long as b isn't ambiguous) 

while llvm only accepts (ms also accept these):
fstp [eax]x.b (evaluates it to be eax+b_offset)
fstp [eax]foo.b (evaluates it to be eax+b_offset)

-- 
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/20170301/e2a13b66/attachment.html>


More information about the llvm-bugs mailing list