2009-06-03 22:30:14 +02:00
|
|
|
//====- AlphaMachineFuctionInfo.h - Alpha machine function info -*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file declares Alpha-specific per-machine-function information.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef ALPHAMACHINEFUNCTIONINFO_H
|
|
|
|
#define ALPHAMACHINEFUNCTIONINFO_H
|
|
|
|
|
|
|
|
#include "llvm/CodeGen/MachineFunction.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
/// AlphaMachineFunctionInfo - This class is derived from MachineFunction
|
|
|
|
/// private Alpha target-specific information for each MachineFunction.
|
|
|
|
class AlphaMachineFunctionInfo : public MachineFunctionInfo {
|
|
|
|
/// GlobalBaseReg - keeps track of the virtual register initialized for
|
|
|
|
/// use as the global base register. This is used for PIC in some PIC
|
|
|
|
/// relocation models.
|
|
|
|
unsigned GlobalBaseReg;
|
|
|
|
|
|
|
|
/// GlobalRetAddr = keeps track of the virtual register initialized for
|
|
|
|
/// the return address value.
|
|
|
|
unsigned GlobalRetAddr;
|
|
|
|
|
2010-04-17 16:41:14 +02:00
|
|
|
/// VarArgsOffset - What is the offset to the first vaarg
|
|
|
|
int VarArgsOffset;
|
|
|
|
/// VarArgsBase - What is the base FrameIndex
|
|
|
|
int VarArgsBase;
|
|
|
|
|
2009-06-03 22:30:14 +02:00
|
|
|
public:
|
2010-04-17 16:41:14 +02:00
|
|
|
AlphaMachineFunctionInfo() : GlobalBaseReg(0), GlobalRetAddr(0),
|
|
|
|
VarArgsOffset(0), VarArgsBase(0) {}
|
2009-06-03 22:30:14 +02:00
|
|
|
|
2009-06-06 01:05:51 +02:00
|
|
|
explicit AlphaMachineFunctionInfo(MachineFunction &MF) : GlobalBaseReg(0),
|
2010-04-17 16:41:14 +02:00
|
|
|
GlobalRetAddr(0),
|
|
|
|
VarArgsOffset(0),
|
|
|
|
VarArgsBase(0) {}
|
2009-06-03 22:30:14 +02:00
|
|
|
|
|
|
|
unsigned getGlobalBaseReg() const { return GlobalBaseReg; }
|
|
|
|
void setGlobalBaseReg(unsigned Reg) { GlobalBaseReg = Reg; }
|
|
|
|
|
|
|
|
unsigned getGlobalRetAddr() const { return GlobalRetAddr; }
|
|
|
|
void setGlobalRetAddr(unsigned Reg) { GlobalRetAddr = Reg; }
|
2010-04-17 16:41:14 +02:00
|
|
|
|
|
|
|
int getVarArgsOffset() const { return VarArgsOffset; }
|
|
|
|
void setVarArgsOffset(int Offset) { VarArgsOffset = Offset; }
|
|
|
|
|
|
|
|
int getVarArgsBase() const { return VarArgsBase; }
|
|
|
|
void setVarArgsBase(int Base) { VarArgsBase = Base; }
|
2009-06-03 22:30:14 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|