[PATCH] D14607: MS inline asm: produce "ambiguous" error when encountering "<type> ptr <reg name>"

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 14:36:50 PST 2015


rnk added inline comments.

================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:1770-1771
@@ +1769,4 @@
+      if (PtrInOperand){
+        return ErrorOperand(Start, "ambiguous operand - could not "
+          "determine if register or register indirect addressing");
+      }
----------------
I think a better diagnostic would be something like:
expected memory operand after 'ptr', found register operand instead

================
Comment at: test/MC/X86/intel-syntax-ambiguous.s:56
@@ +55,2 @@
+// CHECK: andps xmmword ptr xmm1, xmm1
+andps xmmword ptr xmm1, xmm1
----------------
Can you add a test case with a GPR operand? This also seems bad:
  mov dword ptr eax, ebx
The user should write the following, right?
  mov dword ptr [eax], ebx


Repository:
  rL LLVM

http://reviews.llvm.org/D14607





More information about the llvm-commits mailing list