author | Benjamin Bouvier <benj@benj.me> |
Wed, 19 Apr 2017 13:37:32 +0200 | |
changeset 354676 | 6477b1b7808857c3df4be01c13eb2fbe984eb185 |
parent 354675 | 18c3c29e52b4cb97e62a762a99a7b672b6e79495 |
child 354677 | 3301d5530ddd21e8278f96314797425e8f7b5192 |
push id | 31709 |
push user | ihsiao@mozilla.com |
push date | Tue, 25 Apr 2017 03:21:59 +0000 |
treeherder | mozilla-central@85932a5027c0 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | luke |
bugs | 1357370 |
milestone | 55.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/jit/MacroAssembler.cpp +++ b/js/src/jit/MacroAssembler.cpp @@ -2769,26 +2769,32 @@ MacroAssembler::callWithABINoProfiler(vo } void MacroAssembler::callWithABI(wasm::BytecodeOffset callOffset, wasm::SymbolicAddress imm, MoveOp::Type result) { MOZ_ASSERT(wasm::NeedsBuiltinThunk(imm)); + // We clobber WasmTlsReg below in the loadWasmTlsRegFromFrame(), but Ion + // assumes it is non-volatile, so preserve it manually. + Push(WasmTlsReg); + uint32_t stackAdjust; callWithABIPre(&stackAdjust, /* callFromWasm = */ true); // The TLS register is used in builtin thunks and must be set, by ABI: // reload it after passing arguments, which might have used it at spill // points when placing arguments. loadWasmTlsRegFromFrame(); call(wasm::CallSiteDesc(callOffset.bytecodeOffset, wasm::CallSite::Symbolic), imm); callWithABIPost(stackAdjust, result, /* callFromWasm = */ true); + + Pop(WasmTlsReg); } // =============================================================== // Exit frame footer. void MacroAssembler::linkExitFrame(Register cxreg) {