[llvm] r344906 - [llvm-exegesis] Mark x86 segment register instructions as unsupported.

Guillaume Chatelet via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 22 07:55:43 PDT 2018


Author: gchatelet
Date: Mon Oct 22 07:55:43 2018
New Revision: 344906

URL: http://llvm.org/viewvc/llvm-project?rev=344906&view=rev
Log:
[llvm-exegesis] Mark x86 segment register instructions as unsupported.

Reviewers: courbet

Subscribers: tschuett, llvm-commits

Differential Revision: https://reviews.llvm.org/D53499

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

Modified: llvm/trunk/tools/llvm-exegesis/lib/X86/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/lib/X86/Target.cpp?rev=344906&r1=344905&r2=344906&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/X86/Target.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/lib/X86/Target.cpp Mon Oct 22 07:55:43 2018
@@ -89,6 +89,12 @@ static llvm::Error IsInvalidOpcode(const
         Op.getExplicitOperandInfo().OperandType == llvm::MCOI::OPERAND_PCREL)
       return llvm::make_error<BenchmarkFailure>(
           "unsupported opcode: PC relative operand");
+  for (const Operand &Op : Instr.Operands)
+    if (Op.isReg() && Op.isExplicit() &&
+        Op.getExplicitOperandInfo().RegClass ==
+            llvm::X86::SEGMENT_REGRegClassID)
+      return llvm::make_error<BenchmarkFailure>(
+          "unsupported opcode: access segment memory");
   // 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)




More information about the llvm-commits mailing list