add a note
[oota-llvm.git] / lib / Target / PowerPC / PPCFrameInfo.h
index ba6209fac5f3c1bd2fb731e5c667e5cd2b90951d..40305be78ee94b64eb11a66f3c7150a891f5eca4 100644 (file)
@@ -1,42 +1,39 @@
-//===-- PowerPCFrameInfo.h - Define TargetFrameInfo for PowerPC -*- C++ -*-===//
-// 
+//===-- PPCFrameInfo.h - Define TargetFrameInfo for PowerPC -----*- C++ -*-===//
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 //
-//----------------------------------------------------------------------------
+//===----------------------------------------------------------------------===//
 
 #ifndef POWERPC_FRAMEINFO_H
 #define POWERPC_FRAMEINFO_H
 
-#include "PowerPC.h"
+#include "PPC.h"
 #include "llvm/Target/TargetFrameInfo.h"
 #include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/MRegisterInfo.h"
-#include <map>
 
 namespace llvm {
 
-class PowerPCFrameInfo: public TargetFrameInfo {
+class PPCFrameInfo: public TargetFrameInfo {
   const TargetMachine &TM;
   std::pair<unsigned, int> LR[1];
-  
-public:
 
-  PowerPCFrameInfo(const TargetMachine &inTM)
-    : TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(inTM) {
+public:
+  PPCFrameInfo(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;
   }
 
-  std::pair<unsigned, int> *
+  const std::pair<unsigned, int> *
   getCalleeSaveSpillSlots(unsigned &NumEntries) const {
     NumEntries = 1;
-    return static_cast<std::pair<unsigned, int> *>(LR);
+    return &LR[0];
   }
 };