mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 22:07:27 +00:00
[mips] Reverse the order of source operands of shift and rotate instructions that
have three register operands. No intended functionality changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185376 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3bd2b92267
commit
5112243aec
@ -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