mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-10 14:10:58 +00:00
Rename tMOVhi2lor to tMOVgpr2tgpr. It's not moving from a high register to a low register. It's moving from a GPR register class to a more restrictive tGPR class. Also change tMOVlor2hir, and tMOVhir2hir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77172 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b101b0bdbd
commit
d83360694a
@ -935,7 +935,7 @@ SDNode *ARMDAGToDAGISel::Select(SDValue Op) {
|
||||
std::swap(LHSR, RHSR);
|
||||
}
|
||||
if (RHSR && RHSR->getReg() == ARM::SP) {
|
||||
SDValue Val = SDValue(CurDAG->getTargetNode(ARM::tMOVlor2hir, dl,
|
||||
SDValue Val = SDValue(CurDAG->getTargetNode(ARM::tMOVtgpr2gpr, dl,
|
||||
Op.getValueType(), N0, N0),0);
|
||||
return CurDAG->SelectNodeTo(N, ARM::tADDhirr, Op.getValueType(), Val, N1);
|
||||
}
|
||||
|
@ -427,11 +427,11 @@ def tMOVSr : T1I<(outs tGPR:$dst), (ins tGPR:$src),
|
||||
"movs $dst, $src", []>;
|
||||
|
||||
// FIXME: Make these predicable.
|
||||
def tMOVhir2lor : T1I<(outs tGPR:$dst), (ins GPR:$src),
|
||||
def tMOVgpr2tgpr : T1I<(outs tGPR:$dst), (ins GPR:$src),
|
||||
"mov $dst, $src\t@ hir2lor", []>;
|
||||
def tMOVlor2hir : T1I<(outs GPR:$dst), (ins tGPR:$src),
|
||||
def tMOVtgpr2gpr : T1I<(outs GPR:$dst), (ins tGPR:$src),
|
||||
"mov $dst, $src\t@ lor2hir", []>;
|
||||
def tMOVhir2hir : T1I<(outs GPR:$dst), (ins GPR:$src),
|
||||
def tMOVgpr2gpr : T1I<(outs GPR:$dst), (ins GPR:$src),
|
||||
"mov $dst, $src\t@ hir2hir", []>;
|
||||
} // neverHasSideEffects
|
||||
|
||||
|
@ -81,9 +81,9 @@ bool Thumb1InstrInfo::isMoveInstr(const MachineInstr &MI,
|
||||
default:
|
||||
return false;
|
||||
case ARM::tMOVr:
|
||||
case ARM::tMOVhir2lor:
|
||||
case ARM::tMOVlor2hir:
|
||||
case ARM::tMOVhir2hir:
|
||||
case ARM::tMOVgpr2tgpr:
|
||||
case ARM::tMOVtgpr2gpr:
|
||||
case ARM::tMOVgpr2gpr:
|
||||
assert(MI.getDesc().getNumOperands() >= 2 &&
|
||||
MI.getOperand(0).isReg() &&
|
||||
MI.getOperand(1).isReg() &&
|
||||
@ -136,15 +136,15 @@ bool Thumb1InstrInfo::copyRegToReg(MachineBasicBlock &MBB,
|
||||
|
||||
if (DestRC == ARM::GPRRegisterClass) {
|
||||
if (SrcRC == ARM::GPRRegisterClass) {
|
||||
BuildMI(MBB, I, DL, get(ARM::tMOVhir2hir), DestReg).addReg(SrcReg);
|
||||
BuildMI(MBB, I, DL, get(ARM::tMOVgpr2gpr), DestReg).addReg(SrcReg);
|
||||
return true;
|
||||
} else if (SrcRC == ARM::tGPRRegisterClass) {
|
||||
BuildMI(MBB, I, DL, get(ARM::tMOVlor2hir), DestReg).addReg(SrcReg);
|
||||
BuildMI(MBB, I, DL, get(ARM::tMOVtgpr2gpr), DestReg).addReg(SrcReg);
|
||||
return true;
|
||||
}
|
||||
} else if (DestRC == ARM::tGPRRegisterClass) {
|
||||
if (SrcRC == ARM::GPRRegisterClass) {
|
||||
BuildMI(MBB, I, DL, get(ARM::tMOVhir2lor), DestReg).addReg(SrcReg);
|
||||
BuildMI(MBB, I, DL, get(ARM::tMOVgpr2tgpr), DestReg).addReg(SrcReg);
|
||||
return true;
|
||||
} else if (SrcRC == ARM::tGPRRegisterClass) {
|
||||
BuildMI(MBB, I, DL, get(ARM::tMOVr), DestReg).addReg(SrcReg);
|
||||
@ -165,9 +165,9 @@ canFoldMemoryOperand(const MachineInstr *MI,
|
||||
switch (Opc) {
|
||||
default: break;
|
||||
case ARM::tMOVr:
|
||||
case ARM::tMOVlor2hir:
|
||||
case ARM::tMOVhir2lor:
|
||||
case ARM::tMOVhir2hir: {
|
||||
case ARM::tMOVtgpr2gpr:
|
||||
case ARM::tMOVgpr2tgpr:
|
||||
case ARM::tMOVgpr2gpr: {
|
||||
if (OpNum == 0) { // move -> store
|
||||
unsigned SrcReg = MI->getOperand(1).getReg();
|
||||
if (RI.isPhysicalRegister(SrcReg) && !isARMLowRegister(SrcReg))
|
||||
@ -279,9 +279,9 @@ foldMemoryOperandImpl(MachineFunction &MF, MachineInstr *MI,
|
||||
switch (Opc) {
|
||||
default: break;
|
||||
case ARM::tMOVr:
|
||||
case ARM::tMOVlor2hir:
|
||||
case ARM::tMOVhir2lor:
|
||||
case ARM::tMOVhir2hir: {
|
||||
case ARM::tMOVtgpr2gpr:
|
||||
case ARM::tMOVgpr2tgpr:
|
||||
case ARM::tMOVgpr2gpr: {
|
||||
if (OpNum == 0) { // move -> store
|
||||
unsigned SrcReg = MI->getOperand(1).getReg();
|
||||
bool isKill = MI->getOperand(1).isKill();
|
||||
|
@ -127,7 +127,7 @@ void emitThumbRegPlusImmInReg(MachineBasicBlock &MBB,
|
||||
if (DestReg == ARM::SP) {
|
||||
assert(BaseReg == ARM::SP && "Unexpected!");
|
||||
LdReg = ARM::R3;
|
||||
BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVlor2hir), ARM::R12)
|
||||
BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVtgpr2gpr), ARM::R12)
|
||||
.addReg(ARM::R3, RegState::Kill);
|
||||
}
|
||||
|
||||
@ -155,7 +155,7 @@ void emitThumbRegPlusImmInReg(MachineBasicBlock &MBB,
|
||||
AddDefaultPred(MIB);
|
||||
|
||||
if (DestReg == ARM::SP)
|
||||
BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVhir2lor), ARM::R3)
|
||||
BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVgpr2tgpr), ARM::R3)
|
||||
.addReg(ARM::R12, RegState::Kill);
|
||||
}
|
||||
|
||||
@ -450,7 +450,7 @@ void Thumb1RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
|
||||
|
||||
if (Offset == 0) {
|
||||
// Turn it into a move.
|
||||
MI.setDesc(TII.get(ARM::tMOVhir2lor));
|
||||
MI.setDesc(TII.get(ARM::tMOVgpr2tgpr));
|
||||
MI.getOperand(i).ChangeToRegister(FrameReg, false);
|
||||
MI.RemoveOperand(i+1);
|
||||
return;
|
||||
@ -608,12 +608,12 @@ void Thumb1RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
|
||||
unsigned TmpReg = ARM::R3;
|
||||
bool UseRR = false;
|
||||
if (ValReg == ARM::R3) {
|
||||
BuildMI(MBB, II, dl, TII.get(ARM::tMOVlor2hir), ARM::R12)
|
||||
BuildMI(MBB, II, dl, TII.get(ARM::tMOVtgpr2gpr), ARM::R12)
|
||||
.addReg(ARM::R2, RegState::Kill);
|
||||
TmpReg = ARM::R2;
|
||||
}
|
||||
if (TmpReg == ARM::R3 && AFI->isR3LiveIn())
|
||||
BuildMI(MBB, II, dl, TII.get(ARM::tMOVlor2hir), ARM::R12)
|
||||
BuildMI(MBB, II, dl, TII.get(ARM::tMOVtgpr2gpr), ARM::R12)
|
||||
.addReg(ARM::R3, RegState::Kill);
|
||||
if (Opcode == ARM::tSpill) {
|
||||
if (FrameReg == ARM::SP)
|
||||
@ -635,10 +635,10 @@ void Thumb1RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
|
||||
|
||||
MachineBasicBlock::iterator NII = next(II);
|
||||
if (ValReg == ARM::R3)
|
||||
BuildMI(MBB, NII, dl, TII.get(ARM::tMOVhir2lor), ARM::R2)
|
||||
BuildMI(MBB, NII, dl, TII.get(ARM::tMOVgpr2tgpr), ARM::R2)
|
||||
.addReg(ARM::R12, RegState::Kill);
|
||||
if (TmpReg == ARM::R3 && AFI->isR3LiveIn())
|
||||
BuildMI(MBB, NII, dl, TII.get(ARM::tMOVhir2lor), ARM::R3)
|
||||
BuildMI(MBB, NII, dl, TII.get(ARM::tMOVgpr2tgpr), ARM::R3)
|
||||
.addReg(ARM::R12, RegState::Kill);
|
||||
} else
|
||||
assert(false && "Unexpected opcode!");
|
||||
@ -813,7 +813,7 @@ void Thumb1RegisterInfo::emitEpilogue(MachineFunction &MF,
|
||||
emitThumbRegPlusImmediate(MBB, MBBI, ARM::SP, FramePtr, -NumBytes,
|
||||
TII, *this, dl);
|
||||
else
|
||||
BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVlor2hir), ARM::SP)
|
||||
BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVtgpr2gpr), ARM::SP)
|
||||
.addReg(FramePtr);
|
||||
} else {
|
||||
if (MBBI->getOpcode() == ARM::tBX_RET &&
|
||||
|
Loading…
Reference in New Issue
Block a user