2002-12-28 20:32:54 +00:00
|
|
|
//===- X86RegisterInfo.h - X86 Register Information Impl --------*- C++ -*-===//
|
2005-04-21 23:38:14 +00:00
|
|
|
//
|
2003-10-21 15:17:13 +00:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
2005-04-21 23:38:14 +00:00
|
|
|
//
|
2003-10-21 15:17:13 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2002-10-25 22:55:53 +00:00
|
|
|
//
|
|
|
|
// This file contains the X86 implementation of the MRegisterInfo class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef X86REGISTERINFO_H
|
|
|
|
#define X86REGISTERINFO_H
|
|
|
|
|
|
|
|
#include "llvm/Target/MRegisterInfo.h"
|
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
class llvm::Type;
|
2002-11-20 18:59:43 +00:00
|
|
|
|
2003-08-03 15:48:14 +00:00
|
|
|
#include "X86GenRegisterInfo.h.inc"
|
2002-12-25 05:06:43 +00:00
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
namespace llvm {
|
|
|
|
|
2003-08-03 15:48:14 +00:00
|
|
|
struct X86RegisterInfo : public X86GenRegisterInfo {
|
|
|
|
X86RegisterInfo();
|
2002-12-25 05:06:43 +00:00
|
|
|
|
2002-12-28 20:32:54 +00:00
|
|
|
/// Code Generation virtual methods...
|
2004-08-15 22:15:11 +00:00
|
|
|
void storeRegToStackSlot(MachineBasicBlock &MBB,
|
2004-02-12 08:11:04 +00:00
|
|
|
MachineBasicBlock::iterator MI,
|
2005-09-30 01:29:42 +00:00
|
|
|
unsigned SrcReg, int FrameIndex,
|
|
|
|
const TargetRegisterClass *RC) const;
|
2004-08-15 22:15:11 +00:00
|
|
|
|
|
|
|
void loadRegFromStackSlot(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI,
|
2005-09-30 01:29:42 +00:00
|
|
|
unsigned DestReg, int FrameIndex,
|
|
|
|
const TargetRegisterClass *RC) const;
|
2005-04-21 23:38:14 +00:00
|
|
|
|
2004-08-15 22:15:11 +00:00
|
|
|
void copyRegToReg(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI,
|
|
|
|
unsigned DestReg, unsigned SrcReg,
|
|
|
|
const TargetRegisterClass *RC) const;
|
2002-12-25 05:06:43 +00:00
|
|
|
|
2004-02-17 05:54:57 +00:00
|
|
|
/// foldMemoryOperand - If this target supports it, fold a load or store of
|
|
|
|
/// the specified stack slot into the specified machine instruction for the
|
|
|
|
/// specified operand. If this is possible, the target should perform the
|
|
|
|
/// folding and return true, otherwise it should return false. If it folds
|
|
|
|
/// the instruction, it is likely that the MachineInstruction the iterator
|
|
|
|
/// references has been changed.
|
2004-03-14 20:14:27 +00:00
|
|
|
virtual MachineInstr* foldMemoryOperand(MachineInstr* MI,
|
2004-03-14 07:19:51 +00:00
|
|
|
unsigned OpNum,
|
|
|
|
int FrameIndex) const;
|
2004-02-17 04:33:18 +00:00
|
|
|
|
|
|
|
|
2004-02-14 19:49:54 +00:00
|
|
|
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
|
|
|
MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI) const;
|
2002-12-13 09:54:12 +00:00
|
|
|
|
2004-08-14 22:05:10 +00:00
|
|
|
void eliminateFrameIndex(MachineBasicBlock::iterator MI) const;
|
2002-11-20 18:59:43 +00:00
|
|
|
|
2004-02-14 19:49:54 +00:00
|
|
|
void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
|
2002-12-03 23:11:21 +00:00
|
|
|
|
2004-02-14 19:49:54 +00:00
|
|
|
void emitPrologue(MachineFunction &MF) const;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
2006-03-23 18:12:57 +00:00
|
|
|
|
2006-03-28 13:48:33 +00:00
|
|
|
// Debug information queries.
|
2006-04-07 16:34:46 +00:00
|
|
|
unsigned getRARegister() const;
|
2006-03-28 13:48:33 +00:00
|
|
|
unsigned getFrameRegister(MachineFunction &MF) const;
|
2002-10-25 22:55:53 +00:00
|
|
|
};
|
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
} // End llvm namespace
|
|
|
|
|
2002-10-25 22:55:53 +00:00
|
|
|
#endif
|