mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 22:58:50 +00:00
Use COPY in targets
llvm-svn: 108063
This commit is contained in:
parent
f0d1bf23eb
commit
b1c6191d3b
@ -427,11 +427,8 @@ unsigned AlphaInstrInfo::getGlobalBaseReg(MachineFunction *MF) const {
|
||||
const TargetInstrInfo *TII = MF->getTarget().getInstrInfo();
|
||||
|
||||
GlobalBaseReg = RegInfo.createVirtualRegister(&Alpha::GPRCRegClass);
|
||||
bool Ok = TII->copyRegToReg(FirstMBB, MBBI, GlobalBaseReg, Alpha::R29,
|
||||
&Alpha::GPRCRegClass, &Alpha::GPRCRegClass,
|
||||
DebugLoc());
|
||||
assert(Ok && "Couldn't assign to global base register!");
|
||||
Ok = Ok; // Silence warning when assertions are turned off.
|
||||
BuildMI(FirstMBB, MBBI, DebugLoc(), TII->get(TargetOpcode::COPY),
|
||||
GlobalBaseReg).addReg(Alpha::R29);
|
||||
RegInfo.addLiveIn(Alpha::R29);
|
||||
|
||||
AlphaFI->setGlobalBaseReg(GlobalBaseReg);
|
||||
@ -455,11 +452,8 @@ unsigned AlphaInstrInfo::getGlobalRetAddr(MachineFunction *MF) const {
|
||||
const TargetInstrInfo *TII = MF->getTarget().getInstrInfo();
|
||||
|
||||
GlobalRetAddr = RegInfo.createVirtualRegister(&Alpha::GPRCRegClass);
|
||||
bool Ok = TII->copyRegToReg(FirstMBB, MBBI, GlobalRetAddr, Alpha::R26,
|
||||
&Alpha::GPRCRegClass, &Alpha::GPRCRegClass,
|
||||
DebugLoc());
|
||||
assert(Ok && "Couldn't assign to global return address register!");
|
||||
Ok = Ok; // Silence warning when assertions are turned off.
|
||||
BuildMI(FirstMBB, MBBI, DebugLoc(), TII->get(TargetOpcode::COPY),
|
||||
GlobalRetAddr).addReg(Alpha::R26);
|
||||
RegInfo.addLiveIn(Alpha::R26);
|
||||
|
||||
AlphaFI->setGlobalRetAddr(GlobalRetAddr);
|
||||
|
@ -210,12 +210,8 @@ unsigned MBlazeInstrInfo::getGlobalBaseReg(MachineFunction *MF) const {
|
||||
const TargetInstrInfo *TII = MF->getTarget().getInstrInfo();
|
||||
|
||||
GlobalBaseReg = RegInfo.createVirtualRegister(MBlaze::CPURegsRegisterClass);
|
||||
bool Ok = TII->copyRegToReg(FirstMBB, MBBI, GlobalBaseReg, MBlaze::R20,
|
||||
MBlaze::CPURegsRegisterClass,
|
||||
MBlaze::CPURegsRegisterClass,
|
||||
DebugLoc());
|
||||
assert(Ok && "Couldn't assign to global base register!");
|
||||
Ok = Ok; // Silence warning when assertions are turned off.
|
||||
BuildMI(FirstMBB, MBBI, DebugLoc(), TII->get(TargetOpcode::COPY),
|
||||
GlobalBaseReg).addReg(MBlaze::R20);
|
||||
RegInfo.addLiveIn(MBlaze::R20);
|
||||
|
||||
MBlazeFI->setGlobalBaseReg(GlobalBaseReg);
|
||||
|
@ -620,12 +620,8 @@ unsigned MipsInstrInfo::getGlobalBaseReg(MachineFunction *MF) const {
|
||||
const TargetInstrInfo *TII = MF->getTarget().getInstrInfo();
|
||||
|
||||
GlobalBaseReg = RegInfo.createVirtualRegister(Mips::CPURegsRegisterClass);
|
||||
bool Ok = TII->copyRegToReg(FirstMBB, MBBI, GlobalBaseReg, Mips::GP,
|
||||
Mips::CPURegsRegisterClass,
|
||||
Mips::CPURegsRegisterClass,
|
||||
DebugLoc());
|
||||
assert(Ok && "Couldn't assign to global base register!");
|
||||
Ok = Ok; // Silence warning when assertions are turned off.
|
||||
BuildMI(FirstMBB, MBBI, DebugLoc(), TII->get(TargetOpcode::COPY),
|
||||
GlobalBaseReg).addReg(Mips::GP);
|
||||
RegInfo.addLiveIn(Mips::GP);
|
||||
|
||||
MipsFI->setGlobalBaseReg(GlobalBaseReg);
|
||||
|
Loading…
Reference in New Issue
Block a user