mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Move copyRegToReg from MRegisterInfo to TargetInstrInfo. This is part of the
Machine-level API cleanup instigated by Chris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45470 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -289,6 +289,23 @@ InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
|
||||
return 2;
|
||||
}
|
||||
|
||||
void MipsInstrInfo::
|
||||
copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
||||
unsigned DestReg, unsigned SrcReg,
|
||||
const TargetRegisterClass *DestRC,
|
||||
const TargetRegisterClass *SrcRC) const {
|
||||
if (DestRC != SrcRC) {
|
||||
cerr << "Not yet supported!";
|
||||
abort();
|
||||
}
|
||||
|
||||
if (DestRC == Mips::CPURegsRegisterClass)
|
||||
BuildMI(MBB, I, get(Mips::ADDu), DestReg).addReg(Mips::ZERO)
|
||||
.addReg(SrcReg);
|
||||
else
|
||||
assert (0 && "Can't copy this register");
|
||||
}
|
||||
|
||||
unsigned MipsInstrInfo::
|
||||
RemoveBranch(MachineBasicBlock &MBB) const
|
||||
{
|
||||
|
@@ -83,6 +83,10 @@ public:
|
||||
virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
|
||||
MachineBasicBlock *FBB,
|
||||
const std::vector<MachineOperand> &Cond) const;
|
||||
virtual void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
||||
unsigned DestReg, unsigned SrcReg,
|
||||
const TargetRegisterClass *DestRC,
|
||||
const TargetRegisterClass *SrcRC) const;
|
||||
virtual bool BlockHasNoFallThrough(MachineBasicBlock &MBB) const;
|
||||
virtual bool ReverseBranchCondition(std::vector<MachineOperand> &Cond) const;
|
||||
|
||||
|
@@ -148,24 +148,6 @@ void MipsRegisterInfo::loadRegFromAddr(MachineFunction &MF, unsigned DestReg,
|
||||
return;
|
||||
}
|
||||
|
||||
void MipsRegisterInfo::
|
||||
copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
||||
unsigned DestReg, unsigned SrcReg,
|
||||
const TargetRegisterClass *DestRC,
|
||||
const TargetRegisterClass *SrcRC) const
|
||||
{
|
||||
if (DestRC != SrcRC) {
|
||||
cerr << "Not yet supported!";
|
||||
abort();
|
||||
}
|
||||
|
||||
if (DestRC == Mips::CPURegsRegisterClass)
|
||||
BuildMI(MBB, I, TII.get(Mips::ADDu), DestReg).addReg(Mips::ZERO)
|
||||
.addReg(SrcReg);
|
||||
else
|
||||
assert (0 && "Can't copy this register");
|
||||
}
|
||||
|
||||
void MipsRegisterInfo::reMaterialize(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator I,
|
||||
unsigned DestReg,
|
||||
|
Reference in New Issue
Block a user