mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Teach the dag scheduler to handle inline asm nodes with multi-value immediate operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41386 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cf4bb317ef
commit
7df31dc89b
@ -753,15 +753,16 @@ void ScheduleDAG::EmitNode(SDNode *Node,
|
||||
}
|
||||
break;
|
||||
case 3: { // Immediate.
|
||||
assert(NumVals == 1 && "Unknown immediate value!");
|
||||
if (ConstantSDNode *CS=dyn_cast<ConstantSDNode>(Node->getOperand(i))){
|
||||
MI->addImmOperand(CS->getValue());
|
||||
} else {
|
||||
GlobalAddressSDNode *GA =
|
||||
cast<GlobalAddressSDNode>(Node->getOperand(i));
|
||||
MI->addGlobalAddressOperand(GA->getGlobal(), GA->getOffset());
|
||||
for (; NumVals; --NumVals, ++i) {
|
||||
if (ConstantSDNode *CS =
|
||||
dyn_cast<ConstantSDNode>(Node->getOperand(i))) {
|
||||
MI->addImmOperand(CS->getValue());
|
||||
} else {
|
||||
GlobalAddressSDNode *GA =
|
||||
cast<GlobalAddressSDNode>(Node->getOperand(i));
|
||||
MI->addGlobalAddressOperand(GA->getGlobal(), GA->getOffset());
|
||||
}
|
||||
}
|
||||
++i;
|
||||
break;
|
||||
}
|
||||
case 4: // Addressing mode.
|
||||
|
Loading…
Reference in New Issue
Block a user