diff options
| author | Guillaume Chatelet <gchatelet@google.com> | 2018-10-22 14:55:43 +0000 |
|---|---|---|
| committer | Guillaume Chatelet <gchatelet@google.com> | 2018-10-22 14:55:43 +0000 |
| commit | 02f70a3fde988dc5d9e60ed5428d4ceb805774a9 (patch) | |
| tree | 51588ef956cf3cf0e5303bfb366f7f7326197b6c /llvm/tools | |
| parent | 3c639f33b4d56dee3799e7f361facbc2fad2dea4 (diff) | |
| download | bcm5719-llvm-02f70a3fde988dc5d9e60ed5428d4ceb805774a9.tar.gz bcm5719-llvm-02f70a3fde988dc5d9e60ed5428d4ceb805774a9.zip | |
[llvm-exegesis] Mark x86 segment register instructions as unsupported.
Reviewers: courbet
Subscribers: tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D53499
llvm-svn: 344906
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/X86/Target.cpp | 6 |
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) |

