mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-15 19:24:33 +00:00
[mips] Make "b" (unconditional branch) a pseudo. "b" is an assembly idiom, which is
equivalent to "beq $zero, $zero, offset". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190220 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -323,6 +323,10 @@ bool MipsCodeEmitter::expandPseudos(MachineBasicBlock::instr_iterator &MI,
|
||||
BuildMI(MBB, &*MI, MI->getDebugLoc(), II->get(Mips::SLL), Mips::ZERO)
|
||||
.addReg(Mips::ZERO).addImm(0);
|
||||
break;
|
||||
case Mips::B:
|
||||
BuildMI(MBB, &*MI, MI->getDebugLoc(), II->get(Mips::BEQ)).addReg(Mips::ZERO)
|
||||
.addReg(Mips::ZERO).addOperand(MI->getOperand(0));
|
||||
break;
|
||||
case Mips::JALRPseudo:
|
||||
BuildMI(MBB, &*MI, MI->getDebugLoc(), II->get(Mips::JALR), Mips::RA)
|
||||
.addReg(MI->getOperand(0).getReg());
|
||||
|
Reference in New Issue
Block a user