[PATCH] D53430: [llvm-exegesis] Mark second-form X87 instructions as unsupported.

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 19 05:26:50 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL344782: [llvm-exegesis] Mark second-form X87 instructions as unsupported. (authored by courbet, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D53430

Files:
  llvm/trunk/tools/llvm-exegesis/lib/X86/Target.cpp


Index: llvm/trunk/tools/llvm-exegesis/lib/X86/Target.cpp
===================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/X86/Target.cpp
+++ llvm/trunk/tools/llvm-exegesis/lib/X86/Target.cpp
@@ -26,7 +26,14 @@
   if (OpcodeName.startswith("POPF") || OpcodeName.startswith("PUSHF") ||
       OpcodeName.startswith("ADJCALLSTACK"))
     return llvm::make_error<BenchmarkFailure>(
-        "Unsupported opcode: Push/Pop/AdjCallStack");
+        "unsupported opcode: Push/Pop/AdjCallStack");
+  // We do not handle second-form X87 instructions. We only handle first-form
+  // ones (_Fp), see comment in X86InstrFPStack.td.
+  for (const Operand &Op : Instr.Operands)
+    if (Op.isReg() && Op.isExplicit() &&
+        Op.getExplicitOperandInfo().RegClass == llvm::X86::RSTRegClassID)
+      return llvm::make_error<BenchmarkFailure>(
+          "unsupported second-form X87 instruction");
   return llvm::Error::success();
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53430.170189.patch
Type: text/x-patch
Size: 967 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181019/4697071b/attachment.bin>


More information about the llvm-commits mailing list