SPUFrameLowering.h [plain text]
#ifndef SPU_FRAMEINFO_H
#define SPU_FRAMEINFO_H
#include "SPURegisterInfo.h"
#include "llvm/Target/TargetFrameLowering.h"
#include "llvm/Target/TargetMachine.h"
namespace llvm {
class SPUSubtarget;
class SPUFrameLowering: public TargetFrameLowering {
const SPUSubtarget &Subtarget;
std::pair<unsigned, int> LR[1];
public:
SPUFrameLowering(const SPUSubtarget &sti);
void determineFrameLayout(MachineFunction &MF) const;
void emitPrologue(MachineFunction &MF) const;
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
bool hasFP(const MachineFunction &MF) const;
void processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
RegScavenger *RS = NULL) const;
const std::pair<unsigned, int> *
getCalleeSaveSpillSlots(unsigned &NumEntries) const;
static int stackSlotSize() {
return 16;
}
static int maxFrameOffset() {
return ((1 << 9) - 1) * stackSlotSize();
}
static int minFrameOffset() {
return -(1 << 9) * stackSlotSize();
}
static int minStackSize() {
return (2 * stackSlotSize());
}
static int FItoStackOffset(int frame_index) {
return frame_index * stackSlotSize();
}
};
}
#endif