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

Summary:
We only support the first form because we rely on information that is
only available there.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

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

llvm-svn: 344782
This commit is contained in:
Clement Courbet 2018-10-19 12:24:49 +00:00
parent 1a41a116ec
commit 8d0dd0ba0e
1 changed files with 8 additions and 1 deletions

View File

@ -26,7 +26,14 @@ static llvm::Error IsInvalidOpcode(const Instruction &Instr) {
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();
}