From d3be0b160ec980c3f5fe5f4dabab1d81dac0425e Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 2 Nov 2020 15:01:21 +0100 Subject: [PATCH] [llvm-exegesis][X86] Ignore a few unmeasurable opcodes. Differential Revision: https://reviews.llvm.org/D90744 --- tools/llvm-exegesis/lib/X86/Target.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/llvm-exegesis/lib/X86/Target.cpp b/tools/llvm-exegesis/lib/X86/Target.cpp index 15fa54e2f6a..96781dd807a 100644 --- a/tools/llvm-exegesis/lib/X86/Target.cpp +++ b/tools/llvm-exegesis/lib/X86/Target.cpp @@ -196,6 +196,21 @@ static const char *isInvalidOpcode(const Instruction &Instr) { if (OpcodeName.startswith("POP") || OpcodeName.startswith("PUSH") || OpcodeName.startswith("ADJCALLSTACK") || OpcodeName.startswith("LEAVE")) return "unsupported opcode: Push/Pop/AdjCallStack/Leave"; + switch (Instr.Description.Opcode) { + case X86::LFS16rm: + case X86::LFS32rm: + case X86::LFS64rm: + case X86::LGS16rm: + case X86::LGS32rm: + case X86::LGS64rm: + case X86::LSS16rm: + case X86::LSS32rm: + case X86::LSS64rm: + case X86::SYSENTER: + return "unsupported opcode"; + default: + break; + } if (const auto reason = isInvalidMemoryInstr(Instr)) return reason; // We do not handle instructions with OPERAND_PCREL.