mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-09 10:29:21 +00:00
give MatchableInfo::Operand a constructor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117968 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
efd8dadb4f
commit
4c9f4e4002
@ -329,6 +329,9 @@ struct MatchableInfo {
|
|||||||
|
|
||||||
/// The original operand this corresponds to, if any.
|
/// The original operand this corresponds to, if any.
|
||||||
const CGIOperandList::OperandInfo *OperandInfo;
|
const CGIOperandList::OperandInfo *OperandInfo;
|
||||||
|
|
||||||
|
Operand(ClassInfo *C, const CGIOperandList::OperandInfo *OpInfo)
|
||||||
|
: Class(C), OperandInfo(OpInfo) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
/// InstrName - The target name for this instruction.
|
/// InstrName - The target name for this instruction.
|
||||||
@ -1006,9 +1009,7 @@ void AsmMatcherInfo::BuildInfo() {
|
|||||||
|
|
||||||
// Check for singleton registers.
|
// Check for singleton registers.
|
||||||
if (Record *RegRecord = II->getSingletonRegisterForToken(i, *this)) {
|
if (Record *RegRecord = II->getSingletonRegisterForToken(i, *this)) {
|
||||||
MatchableInfo::Operand Op;
|
MatchableInfo::Operand Op(RegisterClasses[RegRecord], 0);
|
||||||
Op.Class = RegisterClasses[RegRecord];
|
|
||||||
Op.OperandInfo = 0;
|
|
||||||
assert(Op.Class && Op.Class->Registers.size() == 1 &&
|
assert(Op.Class && Op.Class->Registers.size() == 1 &&
|
||||||
"Unexpected class for singleton register");
|
"Unexpected class for singleton register");
|
||||||
II->Operands.push_back(Op);
|
II->Operands.push_back(Op);
|
||||||
@ -1017,10 +1018,7 @@ void AsmMatcherInfo::BuildInfo() {
|
|||||||
|
|
||||||
// Check for simple tokens.
|
// Check for simple tokens.
|
||||||
if (Token[0] != '$') {
|
if (Token[0] != '$') {
|
||||||
MatchableInfo::Operand Op;
|
II->Operands.push_back(MatchableInfo::Operand(getTokenClass(Token), 0));
|
||||||
Op.Class = getTokenClass(Token);
|
|
||||||
Op.OperandInfo = 0;
|
|
||||||
II->Operands.push_back(Op);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1057,10 +1055,8 @@ void AsmMatcherInfo::BuildInfo() {
|
|||||||
assert(OI && "Unable to find tied operand target!");
|
assert(OI && "Unable to find tied operand target!");
|
||||||
}
|
}
|
||||||
|
|
||||||
MatchableInfo::Operand Op;
|
II->Operands.push_back(MatchableInfo::Operand(getOperandClass(Token,
|
||||||
Op.Class = getOperandClass(Token, *OI);
|
*OI), OI));
|
||||||
Op.OperandInfo = OI;
|
|
||||||
II->Operands.push_back(Op);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user