[llvm-commits] CVS: llvm/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp SparcV8InstrInfo.td
Chris Lattner
lattner at cs.uiuc.edu
Fri Jan 27 15:30:15 PST 2006
Changes in directory llvm/lib/Target/SparcV8:
SparcV8ISelDAGToDAG.cpp updated: 1.61 -> 1.62
SparcV8InstrInfo.td updated: 1.104 -> 1.105
---
Log message:
Use V8ISD::CALL instead of ISD::CALL
---
Diffs of the changes: (+9 -5)
SparcV8ISelDAGToDAG.cpp | 12 ++++++++----
SparcV8InstrInfo.td | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
Index: llvm/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp
diff -u llvm/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp:1.61 llvm/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp:1.62
--- llvm/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp:1.61 Fri Jan 27 15:09:22 2006
+++ llvm/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp Fri Jan 27 17:30:03 2006
@@ -46,6 +46,7 @@
SELECT_ICC, // Select between two values using the current ICC flags.
SELECT_FCC, // Select between two values using the current FCC flags.
+ CALL, // A V8 call instruction.
RET_FLAG, // Return with a flag operand.
};
}
@@ -185,6 +186,7 @@
case V8ISD::ITOF: return "V8ISD::ITOF";
case V8ISD::SELECT_ICC: return "V8ISD::SELECT_ICC";
case V8ISD::SELECT_FCC: return "V8ISD::SELECT_FCC";
+ case V8ISD::CALL: return "V8ISD::CALL";
case V8ISD::RET_FLAG: return "V8ISD::RET_FLAG";
}
}
@@ -526,10 +528,12 @@
std::vector<MVT::ValueType> NodeTys;
NodeTys.push_back(MVT::Other); // Returns a chain
NodeTys.push_back(MVT::Flag); // Returns a flag for retval copy to use.
+ std::vector<SDOperand> Ops;
+ Ops.push_back(Chain);
+ Ops.push_back(Callee);
if (InFlag.Val)
- Chain = SDOperand(DAG.getCall(NodeTys, Chain, Callee, InFlag), 0);
- else
- Chain = SDOperand(DAG.getCall(NodeTys, Chain, Callee), 0);
+ Ops.push_back(InFlag);
+ Chain = DAG.getNode(V8ISD::CALL, NodeTys, Ops);
InFlag = Chain.getValue(1);
MVT::ValueType RetTyVT = getValueType(RetTy);
@@ -981,7 +985,7 @@
// The high part is in the Y register.
return CurDAG->SelectNodeTo(N, V8::RDY, MVT::i32, Mul.getValue(1));
}
- case ISD::CALL:
+ case V8ISD::CALL:
// FIXME: This is a workaround for a bug in tblgen.
{ // Pattern #47: (call:Flag (tglobaladdr:i32):$dst, ICC:Flag)
// Emits: (CALL:void (tglobaladdr:i32):$dst)
Index: llvm/lib/Target/SparcV8/SparcV8InstrInfo.td
diff -u llvm/lib/Target/SparcV8/SparcV8InstrInfo.td:1.104 llvm/lib/Target/SparcV8/SparcV8InstrInfo.td:1.105
--- llvm/lib/Target/SparcV8/SparcV8InstrInfo.td:1.104 Thu Jan 26 19:46:15 2006
+++ llvm/lib/Target/SparcV8/SparcV8InstrInfo.td Fri Jan 27 17:30:03 2006
@@ -92,7 +92,7 @@
def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_V8CallSeq, [SDNPHasChain]>;
def SDT_V8Call : SDTypeProfile<0, 1, [SDTCisVT<0, i32>]>;
-def call : SDNode<"ISD::CALL", SDT_V8Call,
+def call : SDNode<"V8ISD::CALL", SDT_V8Call,
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
def SDT_V8RetFlag : SDTypeProfile<0, 0, []>;
More information about the llvm-commits
mailing list