1 //===-- MipsMachineFunctionInfo.h - Private data used for Mips ----*- C++ -*-=//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by Bruno Cardoso Lopes and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the Mips specific subclass of MachineFunctionInfo.
12 //===----------------------------------------------------------------------===//
14 #ifndef MIPS_MACHINE_FUNCTION_INFO_H
15 #define MIPS_MACHINE_FUNCTION_INFO_H
17 #include "llvm/CodeGen/MachineFunction.h"
21 /// MipsFunctionInfo - This class is derived from MachineFunction private
22 /// Mips target-specific information for each MachineFunction.
23 class MipsFunctionInfo : public MachineFunctionInfo {
26 /// Holds for each function where on the stack
27 /// the Frame Pointer must be saved
30 /// Holds for each function where on the stack
31 /// the Return Address must be saved
35 MipsFunctionInfo(MachineFunction& MF)
36 : FPStackOffset(0), RAStackOffset(0)
39 int getFPStackOffset() const { return FPStackOffset; }
40 void setFPStackOffset(int Off) { FPStackOffset = Off; }
42 int getRAStackOffset() const { return RAStackOffset; }
43 void setRAStackOffset(int Off) { RAStackOffset = Off; }
45 int getTopSavedRegOffset() const {
46 return (RAStackOffset > FPStackOffset) ?
47 (RAStackOffset) : (FPStackOffset);
51 } // end of namespace llvm