summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/X86/Target.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/lib/X86/Target.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
index b7548f8f3c3..db1a23b74cc 100644
--- a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
@@ -89,6 +89,12 @@ static llvm::Error IsInvalidOpcode(const Instruction &Instr) {
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)
OpenPOWER on IntegriCloud