[llvm] r344782 - [llvm-exegesis] Mark second-form X87 instructions as unsupported.
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 19 05:24:49 PDT 2018
Author: courbet
Date: Fri Oct 19 05:24:49 2018
New Revision: 344782
URL: http://llvm.org/viewvc/llvm-project?rev=344782&view=rev
Log:
[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
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=344782&r1=344781&r2=344782&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/X86/Target.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/lib/X86/Target.cpp Fri Oct 19 05:24:49 2018
@@ -26,7 +26,14 @@ static llvm::Error IsInvalidOpcode(const
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();
}
More information about the llvm-commits
mailing list