1 //===- X86RegisterInfo.h - X86 Register Information Impl ----------*-C++-*-===//
3 // This file contains the X86 implementation of the MRegisterInfo class.
5 //===----------------------------------------------------------------------===//
7 #ifndef X86REGISTERINFO_H
8 #define X86REGISTERINFO_H
10 #include "llvm/Target/MRegisterInfo.h"
14 struct X86RegisterInfo : public MRegisterInfo {
17 MRegisterInfo::const_iterator const_regclass_begin() const;
18 MRegisterInfo::const_iterator const_regclass_end() const;
20 MachineBasicBlock::iterator
21 storeReg2RegOffset(MachineBasicBlock *MBB,
22 MachineBasicBlock::iterator &MBBI,
23 unsigned DestReg, unsigned SrcReg,
24 unsigned ImmOffset, unsigned dataSize) const;
26 MachineBasicBlock::iterator
27 loadRegOffset2Reg(MachineBasicBlock *MBB,
28 MachineBasicBlock::iterator &MBBI,
29 unsigned DestReg, unsigned SrcReg,
30 unsigned ImmOffset, unsigned dataSize) const;
32 unsigned getFramePointer() const;
33 unsigned getStackPointer() const;
35 const unsigned* getCalleeSaveRegs() const;
36 const unsigned* getCallerSaveRegs() const;
38 /// Returns register class appropriate for input SSA register
40 const TargetRegisterClass *getClassForReg(unsigned Reg) const;
42 const TargetRegisterClass* getRegClassForType(const Type* Ty) const;
44 unsigned getNumRegClasses() const;
46 void buildReg2RegClassMap(std::map<unsigned,const TargetRegisterClass*>&
47 Reg2RegClassMap) const;