mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-23 20:15:35 +00:00
Replace copyRegToReg with copyPhysReg for PIC16.
llvm-svn: 108081
This commit is contained in:
parent
fb3525531b
commit
b15ffc7e90
@ -151,25 +151,20 @@ void PIC16InstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
llvm_unreachable("Can't load this register from stack slot");
|
||||
}
|
||||
|
||||
bool PIC16InstrInfo::copyRegToReg (MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator I,
|
||||
unsigned DestReg, unsigned SrcReg,
|
||||
const TargetRegisterClass *DestRC,
|
||||
const TargetRegisterClass *SrcRC,
|
||||
DebugLoc DL) const {
|
||||
void PIC16InstrInfo::copyPhysReg(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator I, DebugLoc DL,
|
||||
unsigned DestReg, unsigned SrcReg,
|
||||
bool KillSrc) const {
|
||||
unsigned Opc;
|
||||
if (PIC16::FSR16RegClass.contains(DestReg, SrcReg))
|
||||
Opc = PIC16::copy_fsr;
|
||||
else if (PIC16::GPRRegClass.contains(DestReg, SrcReg))
|
||||
Opc = PIC16::copy_w;
|
||||
else
|
||||
llvm_unreachable("Impossible reg-to-reg copy");
|
||||
|
||||
if (DestRC == PIC16::FSR16RegisterClass) {
|
||||
BuildMI(MBB, I, DL, get(PIC16::copy_fsr), DestReg).addReg(SrcReg);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (DestRC == PIC16::GPRRegisterClass) {
|
||||
BuildMI(MBB, I, DL, get(PIC16::copy_w), DestReg).addReg(SrcReg);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Not yet supported.
|
||||
return false;
|
||||
BuildMI(MBB, I, DL, get(Opc), DestReg)
|
||||
.addReg(SrcReg, getKillRegState(KillSrc));
|
||||
}
|
||||
|
||||
bool PIC16InstrInfo::isMoveInstr(const MachineInstr &MI,
|
||||
|
@ -57,12 +57,10 @@ public:
|
||||
unsigned DestReg, int FrameIndex,
|
||||
const TargetRegisterClass *RC,
|
||||
const TargetRegisterInfo *TRI) const;
|
||||
virtual bool copyRegToReg(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator MBBI,
|
||||
unsigned DestReg, unsigned SrcReg,
|
||||
const TargetRegisterClass *DestRC,
|
||||
const TargetRegisterClass *SrcRC,
|
||||
DebugLoc DL) const;
|
||||
virtual void copyPhysReg(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator I, DebugLoc DL,
|
||||
unsigned DestReg, unsigned SrcReg,
|
||||
bool KillSrc) const;
|
||||
virtual bool isMoveInstr(const MachineInstr &MI,
|
||||
unsigned &SrcReg, unsigned &DstReg,
|
||||
unsigned &SrcSubIdx, unsigned &DstSubIdx) const;
|
||||
|
Loading…
Reference in New Issue
Block a user