mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 23:32:27 +00:00
Eliminate special-casing 14-bit immediate load/store opcodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15677 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a5de823844
commit
8e63dcebcc
@ -570,8 +570,11 @@ void Printer::printMachineInstruction(const MachineInstr *MI) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
O << TII.getName(Opcode) << " ";
|
O << TII.getName(Opcode) << " ";
|
||||||
if (Opcode == PPC::LD || Opcode == PPC::LWA ||
|
if (Opcode == PPC::BLR || Opcode == PPC::NOP) {
|
||||||
Opcode == PPC::STDU || Opcode == PPC::STDUX) {
|
// FIXME: BuildMI() should handle 0 params
|
||||||
|
O << "\n";
|
||||||
|
} else if (ArgCount == 3 &&
|
||||||
|
(ArgType[1] == PPCII::Disimm16 || ArgType[1] == PPCII::Disimm14)) {
|
||||||
printOp(MI->getOperand(0));
|
printOp(MI->getOperand(0));
|
||||||
O << ", ";
|
O << ", ";
|
||||||
MachineOperand MO = MI->getOperand(1);
|
MachineOperand MO = MI->getOperand(1);
|
||||||
@ -582,20 +585,6 @@ void Printer::printMachineInstruction(const MachineInstr *MI) {
|
|||||||
O << "(";
|
O << "(";
|
||||||
printOp(MI->getOperand(2));
|
printOp(MI->getOperand(2));
|
||||||
O << ")\n";
|
O << ")\n";
|
||||||
} else if (Opcode == PPC::BLR || Opcode == PPC::NOP) {
|
|
||||||
// FIXME: BuildMI() should handle 0 params
|
|
||||||
O << "\n";
|
|
||||||
} else if (ArgCount == 3 && ArgType[1] == PPCII::Disimm16) {
|
|
||||||
printOp(MI->getOperand(0));
|
|
||||||
O << ", ";
|
|
||||||
printImmOp(MI->getOperand(1), ArgType[1]);
|
|
||||||
O << "(";
|
|
||||||
if (MI->getOperand(2).hasAllocatedReg() &&
|
|
||||||
MI->getOperand(2).getReg() == PPC::R0)
|
|
||||||
O << "0";
|
|
||||||
else
|
|
||||||
printOp(MI->getOperand(2));
|
|
||||||
O << ")\n";
|
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < ArgCount; ++i) {
|
for (i = 0; i < ArgCount; ++i) {
|
||||||
// addi and friends
|
// addi and friends
|
||||||
|
Loading…
x
Reference in New Issue
Block a user