mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
vldm/vstm can only do up to 16 double-word registers at a time.
Radar 7797856 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99630 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
575c91cba7
commit
9a52d0c352
@ -341,6 +341,7 @@ ARMLoadStoreOpt::MergeLDR_STR(MachineBasicBlock &MBB, unsigned SIndex,
|
||||
unsigned PReg = PMO.getReg();
|
||||
unsigned PRegNum = PMO.isUndef() ? UINT_MAX
|
||||
: ARMRegisterInfo::getRegisterNumbering(PReg);
|
||||
unsigned Count = 1;
|
||||
|
||||
for (unsigned i = SIndex+1, e = MemOps.size(); i != e; ++i) {
|
||||
int NewOffset = MemOps[i].Offset;
|
||||
@ -350,11 +351,14 @@ ARMLoadStoreOpt::MergeLDR_STR(MachineBasicBlock &MBB, unsigned SIndex,
|
||||
: ARMRegisterInfo::getRegisterNumbering(Reg);
|
||||
// AM4 - register numbers in ascending order.
|
||||
// AM5 - consecutive register numbers in ascending order.
|
||||
// Can only do up to 16 double-word registers per insn.
|
||||
if (Reg != ARM::SP &&
|
||||
NewOffset == Offset + (int)Size &&
|
||||
((isAM4 && RegNum > PRegNum) || RegNum == PRegNum+1)) {
|
||||
((isAM4 && RegNum > PRegNum)
|
||||
|| ((Size < 8 || Count < 16) && RegNum == PRegNum+1))) {
|
||||
Offset += Size;
|
||||
PRegNum = RegNum;
|
||||
++Count;
|
||||
} else {
|
||||
// Can't merge this in. Try merge the earlier ones first.
|
||||
MergeOpsUpdate(MBB, MemOps, SIndex, i, insertAfter, SOffset,
|
||||
|
Loading…
Reference in New Issue
Block a user