mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-03 15:36:21 +00:00
handle global address constant sdnodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31323 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
956a431930
commit
efa46ce87b
@ -544,8 +544,13 @@ void ScheduleDAG::EmitNode(SDNode *Node,
|
||||
break;
|
||||
case 3: { // Immediate.
|
||||
assert(NumVals == 1 && "Unknown immediate value!");
|
||||
uint64_t Val = cast<ConstantSDNode>(Node->getOperand(i))->getValue();
|
||||
MI->addImmOperand(Val);
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user