mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-20 20:30:56 +00:00
handle global address constant sdnodes
llvm-svn: 31323
This commit is contained in:
parent
cc672e3b2b
commit
3bc1ad2c4a
@ -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