Bug 1233863 - ARM64: Avoid BumpSystemStackPointer(). r=sstangl

This function can only handle small immediate adjustments to the stack pointer
because it is not allowed to use scratch registers.

Don't call it from MacroAssembler::Claim() which may allocate large stack
frames. Simply synchronize the system stack pointer to the pseudo stack pointer
instead.
This commit is contained in:
Jakob Stoklund Olesen 2015-12-21 10:11:07 -08:00
parent 48cf77ddac
commit d9a7e9b459

View File

@ -1564,11 +1564,14 @@ void MacroAssembler::Claim(const Operand& size) {
}
}
if (!sp.Is(GetStackPointer64())) {
BumpSystemStackPointer(size);
}
Sub(GetStackPointer64(), GetStackPointer64(), size);
// Make sure the real stack pointer reflects the claimed stack space.
// We can't use stack memory below the stack pointer, it could be clobbered by
// interupts and signal handlers.
if (!sp.Is(GetStackPointer64())) {
Mov(sp, GetStackPointer64());
}
}