mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
ARM: correct Dwarf output for non-contiguous VFP saves.
When the list of VFP registers to be saved was non-contiguous (so multiple vpush/vpop instructions were needed) these were being ordered oddly, as in: vpush {d8, d9} vpush {d11} This led to the layout in memory being [d11, d8, d9] which is ugly and doesn't match the CFI_INSTRUCTIONs we're generating either (so Dwarf info would be broken). This switches the order of vpush/vpop (in both prologue and epilogue, obviously) so that the Dwarf locations are correct again. rdar://problem/16264856 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203655 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -803,6 +803,11 @@ void ARMFrameLowering::emitPushInst(MachineBasicBlock &MBB,
|
||||
AddDefaultPred(MIB);
|
||||
}
|
||||
Regs.clear();
|
||||
|
||||
// Put any subsequent vpush instructions before this one: they will refer to
|
||||
// higher register numbers so need to be pushed first in order to preserve
|
||||
// monotonicity.
|
||||
--MI;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -886,6 +891,10 @@ void ARMFrameLowering::emitPopInst(MachineBasicBlock &MBB,
|
||||
AddDefaultPred(MIB);
|
||||
}
|
||||
Regs.clear();
|
||||
|
||||
// Put any subsequent vpop instructions after this one: they will refer to
|
||||
// higher register numbers so need to be popped afterwards.
|
||||
++MI;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user