diff options
| author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-04-25 04:40:24 +0000 |
|---|---|---|
| committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-04-25 04:40:24 +0000 |
| commit | a77a8eee50062382b8978394d8967b3c63db73e8 (patch) | |
| tree | 2f95510b2b145a093b0421d4bfdabd76ba7aa20d /llvm/lib/Target/Sparc | |
| parent | dccabec1eab88b5d8143fc2028f09bf37d4ae269 (diff) | |
| download | bcm5719-llvm-a77a8eee50062382b8978394d8967b3c63db73e8.tar.gz bcm5719-llvm-a77a8eee50062382b8978394d8967b3c63db73e8.zip | |
Added functions to compute which register, if any, to use
for a particular argument in a list of arguments.
llvm-svn: 2315
Diffstat (limited to 'llvm/lib/Target/Sparc')
| -rw-r--r-- | llvm/lib/Target/Sparc/SparcInternals.h | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/llvm/lib/Target/Sparc/SparcInternals.h b/llvm/lib/Target/Sparc/SparcInternals.h index 52118f97611..12c86b8b8d4 100644 --- a/llvm/lib/Target/Sparc/SparcInternals.h +++ b/llvm/lib/Target/Sparc/SparcInternals.h @@ -284,11 +284,16 @@ class UltraSparcRegInfo : public MachineRegInfo { PhyRegAlloc &PRA) const; - // To find whether a particular call is to a var arg method - // - bool isVarArgCall(const MachineInstr *CallMI) const; - + // Compute which register can be used for an argument, if any + // + int regNumForIntArg(bool inCallee, bool isVarArgsCall, + unsigned argNo, unsigned intArgNo, unsigned fpArgNo, + unsigned& regClassId) const; + int regNumForFPArg(unsigned RegType, bool inCallee, bool isVarArgsCall, + unsigned argNo, unsigned intArgNo, unsigned fpArgNo, + unsigned& regClassId) const; + public: UltraSparcRegInfo(const UltraSparc &tgt); @@ -429,7 +434,7 @@ public: // MachineInstr * cpReg2RegMI(unsigned SrcReg, unsigned DestReg, int RegType) const; - + MachineInstr * cpReg2MemMI(unsigned SrcReg, unsigned DestPtrReg, int Offset, int RegType) const; @@ -506,32 +511,32 @@ public: // MachineCodeInfoForMethod object for the given method. // int getFirstIncomingArgOffset (MachineCodeForMethod& mcInfo, - bool& pos) const + bool& growUp) const { - pos = true; // arguments area grows upwards + growUp = true; // arguments area grows upwards return FirstIncomingArgOffsetFromFP; } int getFirstOutgoingArgOffset (MachineCodeForMethod& mcInfo, - bool& pos) const + bool& growUp) const { - pos = true; // arguments area grows upwards + growUp = true; // arguments area grows upwards return FirstOutgoingArgOffsetFromSP; } int getFirstOptionalOutgoingArgOffset(MachineCodeForMethod& mcInfo, - bool& pos)const + bool& growUp)const { - pos = true; // arguments area grows upwards + growUp = true; // arguments area grows upwards return FirstOptionalOutgoingArgOffsetFromSP; } int getFirstAutomaticVarOffset (MachineCodeForMethod& mcInfo, - bool& pos) const; + bool& growUp) const; int getRegSpillAreaOffset (MachineCodeForMethod& mcInfo, - bool& pos) const; + bool& growUp) const; int getTmpAreaOffset (MachineCodeForMethod& mcInfo, - bool& pos) const; + bool& growUp) const; int getDynamicAreaOffset (MachineCodeForMethod& mcInfo, - bool& pos) const; + bool& growUp) const; // // These methods specify the base register used for each stack area |

