2002-10-25 22:55:53 +00:00
|
|
|
//===- X86RegisterInfo.h - X86 Register Information Impl ----------*-C++-*-===//
|
|
|
|
//
|
|
|
|
// This file contains the X86 implementation of the MRegisterInfo class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef X86REGISTERINFO_H
|
|
|
|
#define X86REGISTERINFO_H
|
|
|
|
|
|
|
|
#include "llvm/Target/MRegisterInfo.h"
|
|
|
|
|
2002-11-20 18:59:43 +00:00
|
|
|
class Type;
|
|
|
|
|
2002-10-25 22:55:53 +00:00
|
|
|
struct X86RegisterInfo : public MRegisterInfo {
|
|
|
|
X86RegisterInfo();
|
|
|
|
|
2002-11-22 22:43:47 +00:00
|
|
|
MachineBasicBlock::iterator
|
2002-12-15 20:06:35 +00:00
|
|
|
storeReg2RegOffset(MachineBasicBlock &MBB,
|
2002-12-04 17:14:13 +00:00
|
|
|
MachineBasicBlock::iterator MBBI,
|
2002-11-22 22:43:47 +00:00
|
|
|
unsigned DestReg, unsigned SrcReg,
|
|
|
|
unsigned ImmOffset, unsigned dataSize) const;
|
2002-11-20 18:59:43 +00:00
|
|
|
|
2002-11-22 22:43:47 +00:00
|
|
|
MachineBasicBlock::iterator
|
2002-12-15 20:06:35 +00:00
|
|
|
loadRegOffset2Reg(MachineBasicBlock &MBB,
|
2002-12-04 17:14:13 +00:00
|
|
|
MachineBasicBlock::iterator MBBI,
|
2002-11-22 22:43:47 +00:00
|
|
|
unsigned DestReg, unsigned SrcReg,
|
|
|
|
unsigned ImmOffset, unsigned dataSize) const;
|
|
|
|
|
2002-12-13 09:54:12 +00:00
|
|
|
MachineBasicBlock::iterator
|
2002-12-15 20:06:35 +00:00
|
|
|
moveReg2Reg(MachineBasicBlock &MBB,
|
2002-12-13 09:54:12 +00:00
|
|
|
MachineBasicBlock::iterator MBBI,
|
|
|
|
unsigned DestReg, unsigned SrcReg, unsigned dataSize) const;
|
|
|
|
|
|
|
|
MachineBasicBlock::iterator
|
2002-12-15 20:06:35 +00:00
|
|
|
moveImm2Reg(MachineBasicBlock &MBB,
|
2002-12-13 09:54:12 +00:00
|
|
|
MachineBasicBlock::iterator MBBI,
|
|
|
|
unsigned DestReg, unsigned Imm, unsigned dataSize) const;
|
|
|
|
|
2002-11-22 22:43:47 +00:00
|
|
|
unsigned getFramePointer() const;
|
|
|
|
unsigned getStackPointer() const;
|
2002-11-20 18:59:43 +00:00
|
|
|
|
2002-12-03 23:11:21 +00:00
|
|
|
const unsigned* getCalleeSaveRegs() const;
|
|
|
|
const unsigned* getCallerSaveRegs() const;
|
|
|
|
|
2002-12-15 20:06:35 +00:00
|
|
|
void emitPrologue(MachineFunction &MF, unsigned numBytes) const;
|
|
|
|
void emitEpilogue(MachineBasicBlock &MBB, unsigned numBytes) const;
|
2002-12-04 23:57:03 +00:00
|
|
|
|
2002-11-20 18:59:43 +00:00
|
|
|
/// Returns register class appropriate for input SSA register
|
|
|
|
///
|
|
|
|
const TargetRegisterClass *getClassForReg(unsigned Reg) const;
|
|
|
|
|
|
|
|
const TargetRegisterClass* getRegClassForType(const Type* Ty) const;
|
2002-10-25 22:55:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|