From 46030a6b0ae6aabea0ab5b0a458fa121eeecaaa3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 19 Jan 2006 07:22:29 +0000 Subject: [PATCH] implement support for f32 arguments past the first 6 words git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25450 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Sparc/SparcISelDAGToDAG.cpp | 5 +++++ lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lib/Target/Sparc/SparcISelDAGToDAG.cpp b/lib/Target/Sparc/SparcISelDAGToDAG.cpp index e09b308e1fa..c800c5e9df9 100644 --- a/lib/Target/Sparc/SparcISelDAGToDAG.cpp +++ b/lib/Target/Sparc/SparcISelDAGToDAG.cpp @@ -266,6 +266,11 @@ SparcV8TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) { Arg = DAG.getNode(ISD::BIT_CONVERT, MVT::f32, Arg); ArgValues.push_back(Arg); + } else { + int FrameIdx = MF.getFrameInfo()->CreateFixedObject(4, ArgOffset); + SDOperand FIPtr = DAG.getFrameIndex(FrameIdx, MVT::i32); + SDOperand Load = DAG.getLoad(MVT::f32, Root, FIPtr, DAG.getSrcValue(0)); + ArgValues.push_back(Load); } ArgOffset += 4; break; diff --git a/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp b/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp index e09b308e1fa..c800c5e9df9 100644 --- a/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp +++ b/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp @@ -266,6 +266,11 @@ SparcV8TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) { Arg = DAG.getNode(ISD::BIT_CONVERT, MVT::f32, Arg); ArgValues.push_back(Arg); + } else { + int FrameIdx = MF.getFrameInfo()->CreateFixedObject(4, ArgOffset); + SDOperand FIPtr = DAG.getFrameIndex(FrameIdx, MVT::i32); + SDOperand Load = DAG.getLoad(MVT::f32, Root, FIPtr, DAG.getSrcValue(0)); + ArgValues.push_back(Load); } ArgOffset += 4; break;