mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
[mips] Reverse the order of source operands of shift and rotate instructions that
have three register operands. No intended functionality changes. llvm-svn: 185376
This commit is contained in:
parent
4261958c61
commit
c5fa7b5e51
@ -1084,9 +1084,9 @@ MipsTargetLowering::emitAtomicBinaryPartword(MachineInstr *MI,
|
||||
BuildMI(BB, DL, TII->get(Mips::ORi), MaskUpper)
|
||||
.addReg(Mips::ZERO).addImm(MaskImm);
|
||||
BuildMI(BB, DL, TII->get(Mips::SLLV), Mask)
|
||||
.addReg(ShiftAmt).addReg(MaskUpper);
|
||||
.addReg(MaskUpper).addReg(ShiftAmt);
|
||||
BuildMI(BB, DL, TII->get(Mips::NOR), Mask2).addReg(Mips::ZERO).addReg(Mask);
|
||||
BuildMI(BB, DL, TII->get(Mips::SLLV), Incr2).addReg(ShiftAmt).addReg(Incr);
|
||||
BuildMI(BB, DL, TII->get(Mips::SLLV), Incr2).addReg(Incr).addReg(ShiftAmt);
|
||||
|
||||
// atomic.load.binop
|
||||
// loopMBB:
|
||||
@ -1147,7 +1147,7 @@ MipsTargetLowering::emitAtomicBinaryPartword(MachineInstr *MI,
|
||||
BuildMI(BB, DL, TII->get(Mips::AND), MaskedOldVal1)
|
||||
.addReg(OldVal).addReg(Mask);
|
||||
BuildMI(BB, DL, TII->get(Mips::SRLV), SrlRes)
|
||||
.addReg(ShiftAmt).addReg(MaskedOldVal1);
|
||||
.addReg(MaskedOldVal1).addReg(ShiftAmt);
|
||||
BuildMI(BB, DL, TII->get(Mips::SLL), SllRes)
|
||||
.addReg(SrlRes).addImm(ShiftImm);
|
||||
BuildMI(BB, DL, TII->get(Mips::SRA), Dest)
|
||||
@ -1334,16 +1334,16 @@ MipsTargetLowering::emitAtomicCmpSwapPartword(MachineInstr *MI,
|
||||
BuildMI(BB, DL, TII->get(Mips::ORi), MaskUpper)
|
||||
.addReg(Mips::ZERO).addImm(MaskImm);
|
||||
BuildMI(BB, DL, TII->get(Mips::SLLV), Mask)
|
||||
.addReg(ShiftAmt).addReg(MaskUpper);
|
||||
.addReg(MaskUpper).addReg(ShiftAmt);
|
||||
BuildMI(BB, DL, TII->get(Mips::NOR), Mask2).addReg(Mips::ZERO).addReg(Mask);
|
||||
BuildMI(BB, DL, TII->get(Mips::ANDi), MaskedCmpVal)
|
||||
.addReg(CmpVal).addImm(MaskImm);
|
||||
BuildMI(BB, DL, TII->get(Mips::SLLV), ShiftedCmpVal)
|
||||
.addReg(ShiftAmt).addReg(MaskedCmpVal);
|
||||
.addReg(MaskedCmpVal).addReg(ShiftAmt);
|
||||
BuildMI(BB, DL, TII->get(Mips::ANDi), MaskedNewVal)
|
||||
.addReg(NewVal).addImm(MaskImm);
|
||||
BuildMI(BB, DL, TII->get(Mips::SLLV), ShiftedNewVal)
|
||||
.addReg(ShiftAmt).addReg(MaskedNewVal);
|
||||
.addReg(MaskedNewVal).addReg(ShiftAmt);
|
||||
|
||||
// loop1MBB:
|
||||
// ll oldval,0(alginedaddr)
|
||||
@ -1379,7 +1379,7 @@ MipsTargetLowering::emitAtomicCmpSwapPartword(MachineInstr *MI,
|
||||
int64_t ShiftImm = (Size == 1) ? 24 : 16;
|
||||
|
||||
BuildMI(BB, DL, TII->get(Mips::SRLV), SrlRes)
|
||||
.addReg(ShiftAmt).addReg(MaskedOldVal0);
|
||||
.addReg(MaskedOldVal0).addReg(ShiftAmt);
|
||||
BuildMI(BB, DL, TII->get(Mips::SLL), SllRes)
|
||||
.addReg(SrlRes).addImm(ShiftImm);
|
||||
BuildMI(BB, DL, TII->get(Mips::SRA), Dest)
|
||||
|
@ -421,7 +421,7 @@ class shift_rotate_imm<string opstr, Operand ImmOpnd,
|
||||
|
||||
class shift_rotate_reg<string opstr, RegisterOperand RC,
|
||||
SDPatternOperator OpNode = null_frag>:
|
||||
InstSE<(outs RC:$rd), (ins CPURegsOpnd:$rs, RC:$rt),
|
||||
InstSE<(outs RC:$rd), (ins RC:$rt, CPURegsOpnd:$rs),
|
||||
!strconcat(opstr, "\t$rd, $rt, $rs"),
|
||||
[(set RC:$rd, (OpNode RC:$rt, CPURegsOpnd:$rs))], IIAlu, FrmR, opstr>;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user