mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
The different flavors of ARM have different valid subsets of registers. Check
that the set of callee-saved registers is correct for the specific platform. <rdar://problem/10313708> & ctor_dtor_count & ctor_dtor_count-2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142706 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
224180e81b
commit
b8dcb314f7
@ -6015,9 +6015,19 @@ EmitSjLjDispatchBlock(MachineInstr *MI, MachineBasicBlock *MBB) const {
|
||||
MachineInstrBuilder MIB(&*II);
|
||||
|
||||
for (unsigned i = 0; SavedRegs[i] != 0; ++i) {
|
||||
if (!TRC->contains(SavedRegs[i])) continue;
|
||||
if (!DefRegs[SavedRegs[i]])
|
||||
MIB.addReg(SavedRegs[i], RegState::ImplicitDefine | RegState::Dead);
|
||||
unsigned Reg = SavedRegs[i];
|
||||
if (Subtarget->isThumb2() &&
|
||||
!ARM::tGPRRegisterClass->contains(Reg) &&
|
||||
!ARM::hGPRRegisterClass->contains(Reg))
|
||||
continue;
|
||||
else if (Subtarget->isThumb1Only() &&
|
||||
!ARM::tGPRRegisterClass->contains(Reg))
|
||||
continue;
|
||||
else if (!Subtarget->isThumb() &&
|
||||
!ARM::GPRRegisterClass->contains(Reg))
|
||||
continue;
|
||||
if (!DefRegs[Reg])
|
||||
MIB.addReg(Reg, RegState::ImplicitDefine | RegState::Dead);
|
||||
}
|
||||
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user