Another tweak to X86 instructions to add the missing flex instruction (without
authorKevin Enderby <enderby@apple.com>
Wed, 27 Oct 2010 02:53:04 +0000 (02:53 +0000)
committerKevin Enderby <enderby@apple.com>
Wed, 27 Oct 2010 02:53:04 +0000 (02:53 +0000)
the wait prefix).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117434 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/AsmParser/X86AsmParser.cpp
test/MC/X86/x86-32.s

index 2890cb1dee582c4ee3fbc9a292e423de816115c1..8cc5b693f170a73aa7581b8f730719673724d903 100644 (file)
@@ -1196,7 +1196,7 @@ MatchAndEmitInstruction(SMLoc IDLoc,
   // FIXME: This should be replaced with a real .td file alias mechanism.
   if (Op->getToken() == "fstsw" || Op->getToken() == "fstcw" ||
       Op->getToken() == "finit" || Op->getToken() == "fsave" ||
-      Op->getToken() == "fstenv") {
+      Op->getToken() == "fstenv" || Op->getToken() == "fclex") {
     MCInst Inst;
     Inst.setOpcode(X86::WAIT);
     Out.EmitInstruction(Inst);
@@ -1208,6 +1208,7 @@ MatchAndEmitInstruction(SMLoc IDLoc,
         .Case("fstcw", "fnstcw")
         .Case("fstenv", "fnstenv")
         .Case("fstsw", "fnstsw")
+        .Case("fclex", "fnclex")
         .Default(0);
     assert(Repl && "Unknown wait-prefixed instruction");
     delete Operands[0];
index 590f9681c3e9651a7906a6c5d2248c3e53539e69..27df93626ee167ef1b8bede686b44a936b263369 100644 (file)
@@ -774,3 +774,11 @@ pshufw $90, %mm4, %mm0
 // CHECK: verr 32493
 // CHECK:  encoding: [0x0f,0x00,0x25,0xed,0x7e,0x00,0x00]
                verr    0x7eed
+
+// CHECK: wait
+// CHECK:  encoding: [0x9b]
+               fclex
+
+// CHECK: fnclex
+// CHECK:  encoding: [0xdb,0xe2]
+               fnclex