Mark REX64_PREFIX as In64BitMode, remove hack from X86RecognizableInstr.
authorCraig Topper <craig.topper@gmail.com>
Thu, 2 Jan 2014 19:12:10 +0000 (19:12 +0000)
committerCraig Topper <craig.topper@gmail.com>
Thu, 2 Jan 2014 19:12:10 +0000 (19:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198336 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrInfo.td
utils/TableGen/X86RecognizableInstr.cpp

index 2fea6e1773815c15db492cfb0825ce30a22adc60..5e03a59adc12756d0c99190263b57a17451d6e57 100644 (file)
@@ -1599,7 +1599,8 @@ def CMPXCHG16B : RI<0xC7, MRM1m, (outs), (ins i128mem:$dst),
 def LOCK_PREFIX : I<0xF0, RawFrm, (outs),  (ins), "lock", []>;
 
 // Rex64 instruction prefix
-def REX64_PREFIX : I<0x48, RawFrm, (outs),  (ins), "rex64", []>;
+def REX64_PREFIX : I<0x48, RawFrm, (outs),  (ins), "rex64", []>,
+                     Requires<[In64BitMode]>;
 
 // Data16 instruction prefix
 def DATA16_PREFIX : I<0x66, RawFrm, (outs),  (ins), "data16", []>;
index 3deca23c6bc81ecd9bb4c98e659f9f9acad47389..1198e5a9779a111131d66a5f6bf122d814741730 100644 (file)
@@ -276,7 +276,6 @@ RecognizableInstr::RecognizableInstr(DisassemblerTables &tables,
   }
   // FIXME: These instructions aren't marked as 64-bit in any way
   Is64Bit |= Rec->getName() == "JMP64pcrel32" ||
-             Rec->getName() == "REX64_PREFIX" ||
              Rec->getName().find("MOV64") != Name.npos ||
              Rec->getName().find("PUSH64") != Name.npos ||
              Rec->getName().find("POP64") != Name.npos;