From 52b7aee323df5c079b20692fbd3b45695e444526 Mon Sep 17 00:00:00 2001 From: Zhao Jiazhong Date: Sat, 4 Jul 2020 03:16:53 -0400 Subject: [PATCH] deps: V8: cherry-pick 7889803e82d3 Original commit message: [mips] Use t9 as the function call register. on mips, we should use t9 when jump to a ExternalReference, because the callee function will consider t9 as the function start address. Change-Id: I56e2bf073fd24b2f3434dfd255d48264bfd0b2cd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1826417 Auto-Submit: Yu Yin Commit-Queue: Jakob Kummerow Reviewed-by: Jakob Kummerow Cr-Commit-Position: refs/heads/master@{#63988} Refs: https://github.com/v8/v8/commit/7889803e82d33c7837d9ff22e185e0800f5d5cf0 --- common.gypi | 2 +- deps/v8/src/codegen/mips/macro-assembler-mips.cc | 6 ++---- deps/v8/src/codegen/mips64/macro-assembler-mips64.cc | 6 ++---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/common.gypi b/common.gypi index cebf2121ff9130..0dc9b046298aff 100644 --- a/common.gypi +++ b/common.gypi @@ -34,7 +34,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.39', + 'v8_embedder_string': '-node.40', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/codegen/mips/macro-assembler-mips.cc b/deps/v8/src/codegen/mips/macro-assembler-mips.cc index 2e4698a9e71c78..76503f6d6a544a 100644 --- a/deps/v8/src/codegen/mips/macro-assembler-mips.cc +++ b/deps/v8/src/codegen/mips/macro-assembler-mips.cc @@ -3853,10 +3853,8 @@ void TurboAssembler::Jump(Handle code, RelocInfo::Mode rmode, } void TurboAssembler::Jump(const ExternalReference& reference) { - UseScratchRegisterScope temps(this); - Register scratch = temps.Acquire(); - li(scratch, reference); - Jump(scratch); + li(t9, reference); + Jump(t9); } void MacroAssembler::JumpIfIsInRange(Register value, unsigned lower_limit, diff --git a/deps/v8/src/codegen/mips64/macro-assembler-mips64.cc b/deps/v8/src/codegen/mips64/macro-assembler-mips64.cc index b3537860643784..e1eabc18362a9f 100644 --- a/deps/v8/src/codegen/mips64/macro-assembler-mips64.cc +++ b/deps/v8/src/codegen/mips64/macro-assembler-mips64.cc @@ -4202,10 +4202,8 @@ void TurboAssembler::Jump(Handle code, RelocInfo::Mode rmode, } void TurboAssembler::Jump(const ExternalReference& reference) { - UseScratchRegisterScope temps(this); - Register scratch = temps.Acquire(); - li(scratch, reference); - Jump(scratch); + li(t9, reference); + Jump(t9); } // Note: To call gcc-compiled C code on mips, you must call through t9.