mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-03 15:26:18 +00:00
Heed spill slot alignment on ARM.
Use the spill slot alignment as well as the local variable alignment to determine when the stack needs to be realigned. This works now that the ARM target can always realign the stack by using a base pointer. Still respect the ARMBaseRegisterInfo::canRealignStack() function vetoing a realigned stack. Don't use aligned spill code in that case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146997 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -765,7 +765,8 @@ storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
||||
break;
|
||||
case 16:
|
||||
if (ARM::QPRRegClass.hasSubClassEq(RC)) {
|
||||
if (Align >= 16 && getRegisterInfo().needsStackRealignment(MF)) {
|
||||
// Use aligned spills if the stack can be realigned.
|
||||
if (Align >= 16 && getRegisterInfo().canRealignStack(MF)) {
|
||||
AddDefaultPred(BuildMI(MBB, I, DL, get(ARM::VST1q64Pseudo))
|
||||
.addFrameIndex(FI).addImm(16)
|
||||
.addReg(SrcReg, getKillRegState(isKill))
|
||||
@@ -914,7 +915,7 @@ loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
||||
break;
|
||||
case 16:
|
||||
if (ARM::QPRRegClass.hasSubClassEq(RC)) {
|
||||
if (Align >= 16 && getRegisterInfo().needsStackRealignment(MF)) {
|
||||
if (Align >= 16 && getRegisterInfo().canRealignStack(MF)) {
|
||||
AddDefaultPred(BuildMI(MBB, I, DL, get(ARM::VLD1q64Pseudo), DestReg)
|
||||
.addFrameIndex(FI).addImm(16)
|
||||
.addMemOperand(MMO));
|
||||
|
Reference in New Issue
Block a user