зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1489994 - On ARM64, make sure to switch to the PSP for the prebarrier stub when calling from wasm. r=bbouvier
The Jit stubs, of which the prebarrier is one, require Jit calling conventions. On ARM64 this means that the SP and the PSP (x28) must track each other. Wasm does not use the PSP for that purpose, so must set it up specially when calling directly to jitted code. The prebarrier path did not do so. --HG-- extra : rebase_source : 72eb810f7aa80452c919c529fc9b9bf6de7af512
This commit is contained in:
Родитель
d954c09619
Коммит
83b0bff2d4
|
@ -5655,6 +5655,12 @@ class BaseCompiler final : public BaseCompilerInterface
|
|||
masm.loadWasmTlsRegFromFrame(scratch);
|
||||
masm.loadPtr(Address(scratch, offsetof(TlsData, instance)), scratch);
|
||||
masm.loadPtr(Address(scratch, Instance::offsetOfPreBarrierCode()), scratch);
|
||||
# ifdef JS_CODEGEN_ARM64
|
||||
// The prebarrier stub assumes the PseudoStackPointer is set up. We do
|
||||
// not need to save and restore x28 because it is not yet allocatable.
|
||||
MOZ_ASSERT(!GeneralRegisterSet::All().hasRegisterIndex(x28.asUnsized()));
|
||||
masm.Mov(x28, sp);
|
||||
# endif
|
||||
masm.call(scratch);
|
||||
|
||||
masm.bind(&skipBarrier);
|
||||
|
|
Загрузка…
Ссылка в новой задаче