From dc6843cabe042d229b4f2172b09f353f91545907 Mon Sep 17 00:00:00 2001 From: Lu Yahan Date: Mon, 17 Jan 2022 15:51:18 +0800 Subject: [PATCH] deps: V8: cherry-pick 3cab84c24723 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: [riscv64] Use s1 to save code_obj The caller saved a4 may be clobbered by the callee function. So we substitute it with the callee saved s1 to save code_obj. Change-Id: Iebe707cbaa62d47fdee0aa117e32e88f67dac743 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3096886 Reviewed-by: Ji Qiu Commit-Queue: Ji Qiu Commit-Queue: Yahan Lu Auto-Submit: Yahan Lu Cr-Commit-Position: refs/heads/master@{#76294} Refs: v8/v8@3cab84c2472 PR-URL: https://github.com/nodejs/node/pull/41566 Refs: https://github.com/v8/v8/commit/d8dc66f Refs: https://github.com/v8/v8/commit/3cab84c Refs: https://github.com/v8/v8/commit/471f862 Refs: https://github.com/v8/v8/commit/77599ff Reviewed-By: Jiawen Geng Reviewed-By: Michaƫl Zasso --- common.gypi | 2 +- deps/v8/src/builtins/riscv64/builtins-riscv64.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index 89fac788d3d..4e938b15d6c 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.15', + 'v8_embedder_string': '-node.16', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/builtins/riscv64/builtins-riscv64.cc b/deps/v8/src/builtins/riscv64/builtins-riscv64.cc index 38136ed53a1..764ef97952c 100644 --- a/deps/v8/src/builtins/riscv64/builtins-riscv64.cc +++ b/deps/v8/src/builtins/riscv64/builtins-riscv64.cc @@ -3642,7 +3642,7 @@ void Generate_BaselineOrInterpreterEntry(MacroAssembler* masm, __ Ld(closure, MemOperand(fp, StandardFrameConstants::kFunctionOffset)); // Get the Code object from the shared function info. - Register code_obj = a4; + Register code_obj = s1; __ LoadTaggedPointerField( code_obj, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));