]> granicus.if.org Git - clang/commit
[ms-inline-asm] Use the frontend size only for ambiguous instructions
authorReid Kleckner <rnk@google.com>
Thu, 4 May 2017 18:19:52 +0000 (18:19 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 4 May 2017 18:19:52 +0000 (18:19 +0000)
commit1895863dfb107f56cfedc3059f5489787d043290
treed851dc6bdefa6bef32e09a60ef3437a621ad6e54
parente8c1a7cf0fca45bbc04a7c26c5d0fcd47a3aeac0
[ms-inline-asm] Use the frontend size only for ambiguous instructions

This avoids problems on code like this:
  char buf[16];
  __asm {
    movups xmm0, [buf]
    mov [buf], eax
  }

The frontend size in this case (1) is wrong, and the register makes the
instruction matching unambiguous. There are also enough bytes available
that we shouldn't complain to the user that they are potentially using
an incorrectly sized instruction to access the variable.

Supersedes D32636 and D26586 and fixes PR28266

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302179 91177308-0d34-0410-b5e6-96231b3b80d8
test/CodeGen/mozilla-ms-inline-asm.c
test/CodeGen/ms-inline-asm-64.c
test/CodeGen/ms-inline-asm-avx512.c
test/CodeGen/ms-inline-asm.c
test/CodeGen/ms-inline-asm.cpp
test/CodeGenCXX/ms-inline-asm-fields.cpp