[llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCFrameInfo.h PowerPCTargetMachine.cpp

Misha Brukman brukman at cs.uiuc.edu
Thu Aug 19 14:36:24 PDT 2004



Changes in directory llvm/lib/Target/PowerPC:

PowerPCFrameInfo.h updated: 1.4 -> 1.5
PowerPCTargetMachine.cpp updated: 1.30 -> 1.31
---
Log message:

LR needs to be saved at 16-byte offset on a 64-bit arch


---
Diffs of the changes:  (+6 -6)

Index: llvm/lib/Target/PowerPC/PowerPCFrameInfo.h
diff -u llvm/lib/Target/PowerPC/PowerPCFrameInfo.h:1.4 llvm/lib/Target/PowerPC/PowerPCFrameInfo.h:1.5
--- llvm/lib/Target/PowerPC/PowerPCFrameInfo.h:1.4	Tue Aug 17 00:09:39 2004
+++ llvm/lib/Target/PowerPC/PowerPCFrameInfo.h	Thu Aug 19 16:36:14 2004
@@ -25,10 +25,10 @@
   std::pair<unsigned, int> LR[1];
   
 public:
-  PowerPCFrameInfo(const TargetMachine &tm)
+  PowerPCFrameInfo(const TargetMachine &tm, bool LP64)
     : TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(tm) {
     LR[0].first = PPC::LR;
-    LR[0].second = 8;
+    LR[0].second = LP64 ? 16 : 8;
   }
 
   const std::pair<unsigned, int> *


Index: llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp
diff -u llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.30 llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.31
--- llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.30	Tue Aug 17 00:06:47 2004
+++ llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp	Thu Aug 19 16:36:14 2004
@@ -42,8 +42,8 @@
   // Register the targets
   RegisterTarget<PPC32TargetMachine> 
   X("ppc32", "  PowerPC 32-bit (experimental)");
-  //RegisterTarget<PPC64TargetMachine> 
-  //Y("ppc64", "  PowerPC 64-bit (unimplemented)");
+  RegisterTarget<PPC64TargetMachine> 
+  Y("ppc64", "  PowerPC 64-bit (unimplemented)");
 }
 
 PowerPCTargetMachine::PowerPCTargetMachine(const std::string &name,
@@ -145,14 +145,14 @@
 PPC32TargetMachine::PPC32TargetMachine(const Module &M, IntrinsicLowering *IL)
   : PowerPCTargetMachine(PPC32ID, IL, 
                          TargetData(PPC32ID,false,4,4,4,4,4,4,2,1,4),
-                         PowerPCFrameInfo(*this), PPC32JITInfo(*this)) {}
+                         PowerPCFrameInfo(*this, false), PPC32JITInfo(*this)) {}
 
 /// PPC64TargetMachine ctor - Create a LP64 architecture model
 ///
 PPC64TargetMachine::PPC64TargetMachine(const Module &M, IntrinsicLowering *IL)
   : PowerPCTargetMachine(PPC64ID, IL,
                          TargetData(PPC64ID,false,8,4,4,4,4,4,2,1,4),
-                         PowerPCFrameInfo(*this), PPC64JITInfo(*this)) {}
+                         PowerPCFrameInfo(*this, true), PPC64JITInfo(*this)) {}
 
 unsigned PPC32TargetMachine::getModuleMatchQuality(const Module &M) {
   if (M.getEndianness()  == Module::BigEndian &&






More information about the llvm-commits mailing list