mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-03 14:21:30 +00:00
Instructions with ImmutablePredicateOperand aren't really predicable since their predicates are fixed at isel time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37899 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -411,7 +411,10 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
|
|||||||
if (unsigned NumArgs = MIOpInfo->getNumArgs())
|
if (unsigned NumArgs = MIOpInfo->getNumArgs())
|
||||||
NumOps = NumArgs;
|
NumOps = NumArgs;
|
||||||
|
|
||||||
isPredicable |= Rec->isSubClassOf("PredicateOperand");
|
if (Rec->isSubClassOf("PredicateOperand")) {
|
||||||
|
if (!Rec->getValueAsBit("isImmutable"))
|
||||||
|
isPredicable = true;
|
||||||
|
}
|
||||||
} else if (Rec->getName() == "variable_ops") {
|
} else if (Rec->getName() == "variable_ops") {
|
||||||
hasVariableNumberOfOperands = true;
|
hasVariableNumberOfOperands = true;
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -107,7 +107,8 @@ InstrInfoEmitter::GetOperandInfo(const CodeGenInstruction &Inst) {
|
|||||||
|
|
||||||
// Predicate operands. Check to see if the original unexpanded operand
|
// Predicate operands. Check to see if the original unexpanded operand
|
||||||
// was of type PredicateOperand.
|
// was of type PredicateOperand.
|
||||||
if (Inst.OperandList[i].Rec->isSubClassOf("PredicateOperand"))
|
if (Inst.OperandList[i].Rec->isSubClassOf("PredicateOperand") &&
|
||||||
|
!Inst.OperandList[i].Rec->getValueAsBit("isImmutable"))
|
||||||
Res += "|M_PREDICATE_OPERAND";
|
Res += "|M_PREDICATE_OPERAND";
|
||||||
|
|
||||||
// Fill in constraint info.
|
// Fill in constraint info.
|
||||||
|
|||||||
Reference in New Issue
Block a user