Bug 1525873: Temporary workaround to reload TLS state after a Cranelift call; r=sunfish

--HG--
extra : rebase_source : 2630b368ff86e057ee4d699f54ed10f1868f9de8
This commit is contained in:
Benjamin Bouvier 2019-02-04 15:13:32 +01:00
Родитель 550c39c9a8
Коммит 18f2199cba
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -88,6 +88,13 @@ static bool GenerateCraneliftCode(WasmMacroAssembler& masm,
return false;
}
// Cranelift isn't aware of pinned registers in general, so we need to reload
// both TLS and pinned regs from the stack.
// TODO(bug 1507820): We should teach Cranelift to reload this register
// itself, so we don't have to do it manually.
masm.loadWasmTlsRegFromFrame();
masm.loadWasmPinnedRegsFromTls();
wasm::GenerateFunctionEpilogue(masm, func.framePushed, offsets);
masm.flush();