[llvm-commits] CVS: llvm/lib/Target/IA64/IA64RegisterInfo.cpp IA64RegisterInfo.h

Jim Laskey jlaskey at apple.com
Thu Mar 23 10:13:13 PST 2006



Changes in directory llvm/lib/Target/IA64:

IA64RegisterInfo.cpp updated: 1.13 -> 1.14
IA64RegisterInfo.h updated: 1.4 -> 1.5
---
Log message:

Add support to locate local variables in frames (early version.)


---
Diffs of the changes:  (+16 -0)

 IA64RegisterInfo.cpp |   14 ++++++++++++++
 IA64RegisterInfo.h   |    2 ++
 2 files changed, 16 insertions(+)


Index: llvm/lib/Target/IA64/IA64RegisterInfo.cpp
diff -u llvm/lib/Target/IA64/IA64RegisterInfo.cpp:1.13 llvm/lib/Target/IA64/IA64RegisterInfo.cpp:1.14
--- llvm/lib/Target/IA64/IA64RegisterInfo.cpp:1.13	Thu Jan 26 03:08:31 2006
+++ llvm/lib/Target/IA64/IA64RegisterInfo.cpp	Thu Mar 23 12:12:57 2006
@@ -22,6 +22,7 @@
 #include "llvm/CodeGen/MachineInstrBuilder.h"
 #include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/CodeGen/MachineFrameInfo.h"
+#include "llvm/CodeGen/MachineLocation.h"
 #include "llvm/Target/TargetFrameInfo.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetOptions.h"
@@ -328,5 +329,18 @@
 
 }
 
+void IA64RegisterInfo::getLocation(MachineFunction &MF, unsigned Index,
+                                   MachineLocation &ML) const {
+  assert(0 && "Needs to be defined for target");
+  MachineFrameInfo *MFI = MF.getFrameInfo();
+  bool FP = hasFP(MF);
+  
+  // FIXME - Needs to handle register variables.
+  // FIXME - Faking that llvm number is same as gcc numbering.
+  ML.set((FP ? IA64::r5 : IA64::r12) - IA64::r0,
+         MFI->getObjectOffset(Index) + MFI->getStackSize());
+}
+
+
 #include "IA64GenRegisterInfo.inc"
 


Index: llvm/lib/Target/IA64/IA64RegisterInfo.h
diff -u llvm/lib/Target/IA64/IA64RegisterInfo.h:1.4 llvm/lib/Target/IA64/IA64RegisterInfo.h:1.5
--- llvm/lib/Target/IA64/IA64RegisterInfo.h:1.4	Thu Sep 29 20:30:29 2005
+++ llvm/lib/Target/IA64/IA64RegisterInfo.h	Thu Mar 23 12:12:57 2006
@@ -48,6 +48,8 @@
 
   void emitPrologue(MachineFunction &MF) const;
   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
+
+  void getLocation(MachineFunction &MF, unsigned Index, MachineLocation &ML) const;
 };
 
 } // End llvm namespace






More information about the llvm-commits mailing list