About issue 13836

40 views
Skip to first unread message

Yahan Lu

unread,
Mar 29, 2023, 2:40:59 AM3/29/23
to v8-dev
After patch
```
plct-dev-7:~/source/node $ git diff HEAD^
diff --git a/deps/v8/src/builtins/builtins-definitions.h b/deps/v8/src/builtins/builtins-definitions.h
index c793ef521f..175acbd495 100644
--- a/deps/v8/src/builtins/builtins-definitions.h
+++ b/deps/v8/src/builtins/builtins-definitions.h
@@ -190,7 +190,7 @@ namespace internal {
  /* Baseline Compiler */                                                      \
  ASM(BaselineOutOfLinePrologue, BaselineOutOfLinePrologue)                    \
  ASM(BaselineOutOfLinePrologueDeopt, Void)                                    \
-  ASM(BaselineOnStackReplacement, OnStackReplacement)                  \
+  ASM(BaselineOnStackReplacement, BaselineOnStackReplacement)                          \
  ASM(BaselineLeaveFrame, BaselineLeaveFrame)                                  \
  ASM(BaselineOrInterpreterEnterAtBytecode, Void)                              \
  ASM(BaselineOrInterpreterEnterAtNextBytecode, Void)                          \

```
The riscv issue(https://bugs.chromium.org/p/v8/issues/detail?id=13836) be fixed. But in my understanding, OnStackReplacementDescriptor is the same as BaselineOnStackReplacementDescriptor.

refer:

Yahan Lu

unread,
Mar 29, 2023, 2:42:10 AM3/29/23
to v8-dev

Leszek Swirski

unread,
Mar 29, 2023, 5:14:08 AM3/29/23
to v8-...@googlegroups.com
The difference is that the old BaselineOnStackReplacementDescriptor was defined as having no context register (DEFINE_PARAMETERS_NO_CONTEXT vs DEFINE_PARAMETERS). It's not clear why this causes issues on riscv and not other architectures though...

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/f3512692-7d3e-4229-8e6d-8ccd0a3fc385n%40googlegroups.com.
Message has been deleted
Message has been deleted
Message has been deleted

Leszek Swirski

unread,
Apr 3, 2023, 5:35:43 AM4/3/23
to v8-...@googlegroups.com
I think this is an unnecessary additional load, though I also wouldn't expect it to cause issues.

On Fri, Mar 31, 2023 at 3:08 PM Yahan Lu <ya...@iscas.ac.cn> wrote:
I have a question about builtins-arm64.cc?

void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
  using D = OnStackReplacementDescriptor;
  static_assert(D::kParameterCount == 1);
  OnStackReplacement(masm, OsrSourceTier::kInterpreter,
                     D::MaybeTargetCodeRegister());
}
void Builtins::Generate_BaselineOnStackReplacement(MacroAssembler* masm) {
  using D = OnStackReplacementDescriptor;
  static_assert(D::kParameterCount == 1);

  __ ldr(kContextRegister,
         MemOperand(fp, BaselineFrameConstants::kContextOffset));
  OnStackReplacement(masm, OsrSourceTier::kBaseline,
                     D::MaybeTargetCodeRegister());
}
InterpreterOnStackReplacement and BaselineOnStackReplacement has the same Descriptor. But why only load kContextRegister in BaselineOnStackReplacement?
Reply all
Reply to author
Forward
0 new messages