2006-02-05 05:50:24 +00:00
|
|
|
//===- SparcRegisterInfo.h - Sparc Register Information Impl ----*- C++ -*-===//
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2004-02-25 19:28:19 +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:30:14 +00:00
|
|
|
//
|
2004-02-25 19:28:19 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2006-02-05 05:50:24 +00:00
|
|
|
// This file contains the Sparc implementation of the MRegisterInfo class.
|
2004-02-25 19:28:19 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2006-02-05 05:50:24 +00:00
|
|
|
#ifndef SPARCREGISTERINFO_H
|
|
|
|
#define SPARCREGISTERINFO_H
|
2004-02-25 19:28:19 +00:00
|
|
|
|
|
|
|
#include "llvm/Target/MRegisterInfo.h"
|
2006-02-05 05:50:24 +00:00
|
|
|
#include "SparcGenRegisterInfo.h.inc"
|
2004-02-25 19:28:19 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2006-02-05 05:50:24 +00:00
|
|
|
class SparcSubtarget;
|
2004-02-25 19:28:19 +00:00
|
|
|
class Type;
|
|
|
|
|
2006-02-05 05:50:24 +00:00
|
|
|
struct SparcRegisterInfo : public SparcGenRegisterInfo {
|
|
|
|
SparcSubtarget &Subtarget;
|
2006-02-04 06:58:46 +00:00
|
|
|
|
2006-02-05 05:50:24 +00:00
|
|
|
SparcRegisterInfo(SparcSubtarget &st);
|
2004-02-25 19:28:19 +00:00
|
|
|
|
|
|
|
/// Code Generation virtual methods...
|
2004-08-15 22:15:11 +00:00
|
|
|
void storeRegToStackSlot(MachineBasicBlock &MBB,
|
2004-02-25 19:28:19 +00:00
|
|
|
MachineBasicBlock::iterator MBBI,
|
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 MBBI,
|
2005-09-30 01:29:42 +00:00
|
|
|
unsigned DestReg, int FrameIndex,
|
|
|
|
const TargetRegisterClass *RC) const;
|
2005-04-21 23:30:14 +00:00
|
|
|
|
2004-08-15 22:15:11 +00:00
|
|
|
void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
|
|
|
|
unsigned DestReg, unsigned SrcReg,
|
|
|
|
const TargetRegisterClass *RC) const;
|
2006-02-03 07:06:25 +00:00
|
|
|
|
|
|
|
virtual MachineInstr* foldMemoryOperand(MachineInstr* MI,
|
|
|
|
unsigned OpNum,
|
|
|
|
int FrameIndex) const;
|
2004-02-25 19:28:19 +00:00
|
|
|
|
|
|
|
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
|
|
|
MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator I) const;
|
|
|
|
|
2004-08-14 22:57:22 +00:00
|
|
|
void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
|
2004-02-25 19:28:19 +00:00
|
|
|
|
|
|
|
void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
|
|
|
|
|
|
|
|
void emitPrologue(MachineFunction &MF) const;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
2006-03-23 18:12:57 +00:00
|
|
|
|
|
|
|
void getLocation(MachineFunction &MF, unsigned Index,
|
|
|
|
MachineLocation &ML) const;
|
2004-02-25 19:28:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|