2012-02-28 07:46:26 +00:00
|
|
|
//===-- MipsRegisterInfo.h - Mips Register Information Impl -----*- C++ -*-===//
|
2007-06-06 07:42:06 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2007-06-06 07:42:06 +00:00
|
|
|
//
|
2011-04-15 21:51:11 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2007-06-06 07:42:06 +00:00
|
|
|
//
|
2008-02-10 18:45:23 +00:00
|
|
|
// This file contains the Mips implementation of the TargetRegisterInfo class.
|
2007-06-06 07:42:06 +00:00
|
|
|
//
|
2011-04-15 21:51:11 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2007-06-06 07:42:06 +00:00
|
|
|
|
|
|
|
#ifndef MIPSREGISTERINFO_H
|
|
|
|
#define MIPSREGISTERINFO_H
|
|
|
|
|
2008-07-14 14:42:54 +00:00
|
|
|
#include "Mips.h"
|
2008-02-10 18:45:23 +00:00
|
|
|
#include "llvm/Target/TargetRegisterInfo.h"
|
2011-06-27 18:32:37 +00:00
|
|
|
|
|
|
|
#define GET_REGINFO_HEADER
|
|
|
|
#include "MipsGenRegisterInfo.inc"
|
2007-06-06 07:42:06 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
2008-07-14 14:42:54 +00:00
|
|
|
class MipsSubtarget;
|
2007-06-06 07:42:06 +00:00
|
|
|
class TargetInstrInfo;
|
|
|
|
class Type;
|
|
|
|
|
|
|
|
struct MipsRegisterInfo : public MipsGenRegisterInfo {
|
2008-07-14 14:42:54 +00:00
|
|
|
const MipsSubtarget &Subtarget;
|
2007-06-06 07:42:06 +00:00
|
|
|
const TargetInstrInfo &TII;
|
2011-03-04 17:51:39 +00:00
|
|
|
|
2008-07-14 14:42:54 +00:00
|
|
|
MipsRegisterInfo(const MipsSubtarget &Subtarget, const TargetInstrInfo &tii);
|
2007-06-06 07:42:06 +00:00
|
|
|
|
2007-08-28 05:13:42 +00:00
|
|
|
/// getRegisterNumbering - Given the enum value for some register, e.g.
|
|
|
|
/// Mips::RA, return the number that it corresponds to (e.g. 31).
|
|
|
|
static unsigned getRegisterNumbering(unsigned RegEnum);
|
|
|
|
|
2008-07-14 14:42:54 +00:00
|
|
|
/// Get PIC indirect call register
|
2009-08-12 22:10:57 +00:00
|
|
|
static unsigned getPICCallReg();
|
2008-07-14 14:42:54 +00:00
|
|
|
|
2008-08-06 06:14:43 +00:00
|
|
|
/// Adjust the Mips stack frame.
|
|
|
|
void adjustMipsStackFrame(MachineFunction &MF) const;
|
|
|
|
|
2007-06-06 07:42:06 +00:00
|
|
|
/// Code Generation virtual methods...
|
2012-03-04 03:33:22 +00:00
|
|
|
const uint16_t *getCalleeSavedRegs(const MachineFunction* MF = 0) const;
|
2012-03-01 22:27:29 +00:00
|
|
|
const uint32_t *getCallPreservedMask(CallingConv::ID) const;
|
2007-06-06 07:42:06 +00:00
|
|
|
|
|
|
|
BitVector getReservedRegs(const MachineFunction &MF) const;
|
|
|
|
|
2012-03-28 00:24:17 +00:00
|
|
|
virtual bool requiresRegisterScavenging(const MachineFunction &MF) const;
|
|
|
|
|
2007-06-06 07:42:06 +00:00
|
|
|
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
|
|
|
MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator I) const;
|
|
|
|
|
2007-08-28 05:13:42 +00:00
|
|
|
/// Stack Frame Processing Methods
|
2010-08-26 23:32:16 +00:00
|
|
|
void eliminateFrameIndex(MachineBasicBlock::iterator II,
|
|
|
|
int SPAdj, RegScavenger *RS = NULL) const;
|
2007-06-06 07:42:06 +00:00
|
|
|
|
|
|
|
void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
|
|
|
|
|
2007-08-28 05:13:42 +00:00
|
|
|
/// Debug information queries.
|
2009-11-12 21:00:03 +00:00
|
|
|
unsigned getFrameRegister(const MachineFunction &MF) const;
|
2007-06-06 07:42:06 +00:00
|
|
|
|
2007-08-28 05:13:42 +00:00
|
|
|
/// Exception handling queries.
|
2007-06-06 07:42:06 +00:00
|
|
|
unsigned getEHExceptionRegister() const;
|
|
|
|
unsigned getEHHandlerRegister() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|