diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-27 23:30:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-27 23:30:03 +0000 |
commit | 44ea7b1a6cc96121f9a558902742e19fa876d847 (patch) | |
tree | 72ee12b79a5cf3018bf3b09579f4aaf62d7af4b8 /lib/Target/Sparc | |
parent | d41e9e5e7a5243fdda88587a96eadaac37093eea (diff) |
Use V8ISD::CALL instead of ISD::CALL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc')
-rw-r--r-- | lib/Target/Sparc/SparcISelDAGToDAG.cpp | 12 | ||||
-rw-r--r-- | lib/Target/Sparc/SparcInstrInfo.td | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/lib/Target/Sparc/SparcISelDAGToDAG.cpp b/lib/Target/Sparc/SparcISelDAGToDAG.cpp index 4a6eebb1e6..6206218520 100644 --- a/lib/Target/Sparc/SparcISelDAGToDAG.cpp +++ b/lib/Target/Sparc/SparcISelDAGToDAG.cpp @@ -46,6 +46,7 @@ namespace V8ISD { 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 @@ const char *SparcV8TargetLowering::getTargetNodeName(unsigned Opcode) const { 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 @@ SparcV8TargetLowering::LowerCallTo(SDOperand Chain, const Type *RetTy, 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 @@ SDOperand SparcV8DAGToDAGISel::Select(SDOperand Op) { // 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) diff --git a/lib/Target/Sparc/SparcInstrInfo.td b/lib/Target/Sparc/SparcInstrInfo.td index db87d4c850..8269448ca1 100644 --- a/lib/Target/Sparc/SparcInstrInfo.td +++ b/lib/Target/Sparc/SparcInstrInfo.td @@ -92,7 +92,7 @@ def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_V8CallSeq, [SDNPHasChain]>; 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, []>; |