[PATCH] D15150: Add support for "xlat m8"
Marina Yatsina via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 19 08:39:38 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL258135: [X86] Add support for "xlat m8" (authored by myatsina).
Changed prior to commit:
http://reviews.llvm.org/D15150?vs=42667&id=45269#toc
Repository:
rL LLVM
http://reviews.llvm.org/D15150
Files:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/trunk/test/MC/X86/intel-syntax.s
Index: llvm/trunk/test/MC/X86/intel-syntax.s
===================================================================
--- llvm/trunk/test/MC/X86/intel-syntax.s
+++ llvm/trunk/test/MC/X86/intel-syntax.s
@@ -775,3 +775,7 @@
// CHECK: movsl (%esi), %es:(%edi)
// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)DI will be used for the location
// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)SI will be used for the location
+
+xlat byte ptr [eax]
+// CHECK: xlatb
+// CHECK-STDERR: memory operand is only for determining the size, (R|E)BX will be used for the location
Index: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -2475,6 +2475,17 @@
}
}
+ // Transforms "xlat mem8" into "xlatb"
+ if ((Name == "xlat" || Name == "xlatb") && Operands.size() == 2) {
+ X86Operand &Op1 = static_cast<X86Operand &>(*Operands[1]);
+ if (Op1.isMem8()) {
+ Warning(Op1.getStartLoc(), "memory operand is only for determining the "
+ "size, (R|E)BX will be used for the location");
+ Operands.pop_back();
+ static_cast<X86Operand &>(*Operands[0]).setTokenValue("xlatb");
+ }
+ }
+
return false;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15150.45269.patch
Type: text/x-patch
Size: 1395 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160119/f21bc63a/attachment.bin>
More information about the llvm-commits
mailing list