2002-12-28 21:32:54 +01:00
|
|
|
//===- X86RegisterInfo.h - X86 Register Information Impl --------*- C++ -*-===//
|
2005-04-22 01:38:14 +02:00
|
|
|
//
|
2003-10-21 17:17:13 +02: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-22 01:38:14 +02:00
|
|
|
//
|
2003-10-21 17:17:13 +02:00
|
|
|
//===----------------------------------------------------------------------===//
|
2002-10-26 00:55:53 +02: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 23:41:34 +01:00
|
|
|
class llvm::Type;
|
2002-11-20 19:59:43 +01:00
|
|
|
|
2003-08-03 17:48:14 +02:00
|
|
|
#include "X86GenRegisterInfo.h.inc"
|
2002-12-25 06:06:43 +01:00
|
|
|
|
2003-11-11 23:41:34 +01:00
|
|
|
namespace llvm {
|
|
|
|
|
2003-08-03 17:48:14 +02:00
|
|
|
struct X86RegisterInfo : public X86GenRegisterInfo {
|
|
|
|
X86RegisterInfo();
|
2002-12-28 21:32:54 +01:00
|
|
|
const TargetRegisterClass* getRegClassForType(const Type* Ty) const;
|
2002-12-25 06:06:43 +01:00
|
|
|
|
2002-12-28 21:32:54 +01:00
|
|
|
/// Code Generation virtual methods...
|
2004-08-16 00:15:11 +02:00
|
|
|
void storeRegToStackSlot(MachineBasicBlock &MBB,
|
2004-02-12 09:11:04 +01:00
|
|
|
MachineBasicBlock::iterator MI,
|
2004-08-16 00:15:11 +02:00
|
|
|
unsigned SrcReg, int FrameIndex) const;
|
|
|
|
|
|
|
|
void loadRegFromStackSlot(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI,
|
|
|
|
unsigned DestReg, int FrameIndex) const;
|
2005-04-22 01:38:14 +02:00
|
|
|
|
2004-08-16 00:15:11 +02:00
|
|
|
void copyRegToReg(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI,
|
|
|
|
unsigned DestReg, unsigned SrcReg,
|
|
|
|
const TargetRegisterClass *RC) const;
|
2002-12-25 06:06:43 +01:00
|
|
|
|
2004-02-17 06:54:57 +01: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 21:14:27 +01:00
|
|
|
virtual MachineInstr* foldMemoryOperand(MachineInstr* MI,
|
2004-03-14 08:19:51 +01:00
|
|
|
unsigned OpNum,
|
|
|
|
int FrameIndex) const;
|
2004-02-17 05:33:18 +01:00
|
|
|
|
|
|
|
|
2004-02-14 20:49:54 +01:00
|
|
|
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
|
|
|
MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI) const;
|
2002-12-13 10:54:12 +01:00
|
|
|
|
2004-08-15 00:05:10 +02:00
|
|
|
void eliminateFrameIndex(MachineBasicBlock::iterator MI) const;
|
2002-11-20 19:59:43 +01:00
|
|
|
|
2004-02-14 20:49:54 +01:00
|
|
|
void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
|
2002-12-04 00:11:21 +01:00
|
|
|
|
2004-02-14 20:49:54 +01:00
|
|
|
void emitPrologue(MachineFunction &MF) const;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
2002-10-26 00:55:53 +02:00
|
|
|
};
|
|
|
|
|
2003-11-11 23:41:34 +01:00
|
|
|
} // End llvm namespace
|
|
|
|
|
2002-10-26 00:55:53 +02:00
|
|
|
#endif
|