mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Whoops, got my cases swapped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11526 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5a051f65d3
commit
90c38c8141
@ -146,12 +146,8 @@ bool PH::PeepholeOptimize(MachineBasicBlock &MBB,
|
||||
case X86::XORri32: Opcode = X86::XORri32b; break;
|
||||
}
|
||||
unsigned R0 = MI->getOperand(0).getReg();
|
||||
unsigned Scale = MI->getOperand(1).getImmedValue();
|
||||
unsigned R1 = MI->getOperand(2).getReg();
|
||||
unsigned Offset = MI->getOperand(3).getImmedValue();
|
||||
I = MBB.insert(MBB.erase(I),
|
||||
BuildMI(Opcode, 5).addReg(R0).addZImm(Scale).
|
||||
addReg(R1).addSImm(Offset).addZImm((char)Val));
|
||||
BuildMI(Opcode, 1, R0, MOTy::UseAndDef).addZImm((char)Val));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -171,8 +167,12 @@ bool PH::PeepholeOptimize(MachineBasicBlock &MBB,
|
||||
case X86::ANDmi32: Opcode = X86::ANDmi32b; break;
|
||||
}
|
||||
unsigned R0 = MI->getOperand(0).getReg();
|
||||
unsigned Scale = MI->getOperand(1).getImmedValue();
|
||||
unsigned R1 = MI->getOperand(2).getReg();
|
||||
unsigned Offset = MI->getOperand(3).getImmedValue();
|
||||
I = MBB.insert(MBB.erase(I),
|
||||
BuildMI(Opcode, 1, R0, MOTy::UseAndDef).addZImm((char)Val));
|
||||
BuildMI(Opcode, 5).addReg(R0).addZImm(Scale).
|
||||
addReg(R1).addSImm(Offset).addZImm((char)Val));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -146,12 +146,8 @@ bool PH::PeepholeOptimize(MachineBasicBlock &MBB,
|
||||
case X86::XORri32: Opcode = X86::XORri32b; break;
|
||||
}
|
||||
unsigned R0 = MI->getOperand(0).getReg();
|
||||
unsigned Scale = MI->getOperand(1).getImmedValue();
|
||||
unsigned R1 = MI->getOperand(2).getReg();
|
||||
unsigned Offset = MI->getOperand(3).getImmedValue();
|
||||
I = MBB.insert(MBB.erase(I),
|
||||
BuildMI(Opcode, 5).addReg(R0).addZImm(Scale).
|
||||
addReg(R1).addSImm(Offset).addZImm((char)Val));
|
||||
BuildMI(Opcode, 1, R0, MOTy::UseAndDef).addZImm((char)Val));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -171,8 +167,12 @@ bool PH::PeepholeOptimize(MachineBasicBlock &MBB,
|
||||
case X86::ANDmi32: Opcode = X86::ANDmi32b; break;
|
||||
}
|
||||
unsigned R0 = MI->getOperand(0).getReg();
|
||||
unsigned Scale = MI->getOperand(1).getImmedValue();
|
||||
unsigned R1 = MI->getOperand(2).getReg();
|
||||
unsigned Offset = MI->getOperand(3).getImmedValue();
|
||||
I = MBB.insert(MBB.erase(I),
|
||||
BuildMI(Opcode, 1, R0, MOTy::UseAndDef).addZImm((char)Val));
|
||||
BuildMI(Opcode, 5).addReg(R0).addZImm(Scale).
|
||||
addReg(R1).addSImm(Offset).addZImm((char)Val));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user