diff options
| author | Jim Laskey <jlaskey@mac.com> | 2006-03-23 18:12:57 +0000 |
|---|---|---|
| committer | Jim Laskey <jlaskey@mac.com> | 2006-03-23 18:12:57 +0000 |
| commit | 3c43609f1f6c382452fa646f734208923333afe2 (patch) | |
| tree | 7ff6ad7fe07f03701c4ff4b2b55aa7e0aea8f05e /llvm/lib/Target/Sparc/SparcRegisterInfo.cpp | |
| parent | 8f64426f5ce5b7b9453f960c81df196aae813d8b (diff) | |
| download | bcm5719-llvm-3c43609f1f6c382452fa646f734208923333afe2.tar.gz bcm5719-llvm-3c43609f1f6c382452fa646f734208923333afe2.zip | |
Add support to locate local variables in frames (early version.)
llvm-svn: 26994
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcRegisterInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/Sparc/SparcRegisterInfo.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp b/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp index ff9c5a3ec3b..21a0cd85d89 100644 --- a/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp +++ b/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp @@ -17,6 +17,7 @@ #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFrameInfo.h" +#include "llvm/CodeGen/MachineLocation.h" #include "llvm/Type.h" #include "llvm/ADT/STLExtras.h" #include <iostream> @@ -199,5 +200,16 @@ void SparcRegisterInfo::emitEpilogue(MachineFunction &MF, BuildMI(MBB, MBBI, SP::RESTORErr, 2, SP::G0).addReg(SP::G0).addReg(SP::G0); } +void SparcRegisterInfo::getLocation(MachineFunction &MF, unsigned Index, + MachineLocation &ML) const { + assert(0 && "Needs to be defined for target"); + MachineFrameInfo *MFI = MF.getFrameInfo(); + + // FIXME - Needs to handle register variables. + // FIXME - Faking that llvm number is same as gcc numbering. + ML.set(SP::G1 - SP::G0, + MFI->getObjectOffset(Index) + MFI->getStackSize()); +} + #include "SparcGenRegisterInfo.inc" |

