mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Change how so_imm and t2_so_imm are handled. At instruction selection time, the immediates are no longer encoded in the imm8 + rot format, that are left as it is. The encoding is now done in ams printing and code emission time instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75048 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -171,12 +171,11 @@ ARMLoadStoreOpt::MergeOps(MachineBasicBlock &MBB,
|
||||
BaseOpc = ARM::SUBri;
|
||||
Offset = - Offset;
|
||||
}
|
||||
int ImmedOffset = ARM_AM::getSOImmVal(Offset);
|
||||
if (ImmedOffset == -1)
|
||||
if (ARM_AM::getSOImmVal(Offset) == -1)
|
||||
return false; // Probably not worth it then.
|
||||
|
||||
BuildMI(MBB, MBBI, dl, TII->get(BaseOpc), NewBase)
|
||||
.addReg(Base, getKillRegState(BaseKill)).addImm(ImmedOffset)
|
||||
.addReg(Base, getKillRegState(BaseKill)).addImm(Offset)
|
||||
.addImm(Pred).addReg(PredReg).addReg(0);
|
||||
Base = NewBase;
|
||||
BaseKill = true; // New base is always killed right its use.
|
||||
|
Reference in New Issue
Block a user