PPC/s390: [sparkplug] Use return to jump to optimized code to keep the RSB balanced

Port af3c5307f0

Original Commit Message:

    This threads through a JumpMode kJump/kReturn to JumpCodeObject so we
    can use a return instruction to jump instead by first pushing the jump
    target and then using a return instruction.

R=verwaest@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I354329238d00503a234556f25adccd920d26d320
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2700036
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72816}
This commit is contained in:
Milad Fa 2021-02-17 09:25:03 -05:00 committed by Commit Bot
parent 862c6281f7
commit e7195170d5
4 changed files with 8 additions and 4 deletions

View File

@ -3336,7 +3336,8 @@ void TurboAssembler::CallCodeObject(Register code_object) {
Call(code_object);
}
void TurboAssembler::JumpCodeObject(Register code_object) {
void TurboAssembler::JumpCodeObject(Register code_object, JumpMode jump_mode) {
DCHECK_EQ(JumpMode::kJump, jump_mode);
LoadCodeObjectEntry(code_object, code_object);
Jump(code_object);
}

View File

@ -443,7 +443,8 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void LoadEntryFromBuiltinIndex(Register builtin_index);
void LoadCodeObjectEntry(Register destination, Register code_object) override;
void CallCodeObject(Register code_object) override;
void JumpCodeObject(Register code_object) override;
void JumpCodeObject(Register code_object,
JumpMode jump_mode = JumpMode::kJump) override;
void CallBuiltinByIndex(Register builtin_index) override;
void CallForDeoptimization(Builtins::Name target, int deopt_id, Label* exit,

View File

@ -4654,7 +4654,8 @@ void TurboAssembler::CallCodeObject(Register code_object) {
Call(code_object);
}
void TurboAssembler::JumpCodeObject(Register code_object) {
void TurboAssembler::JumpCodeObject(Register code_object, JumpMode jump_mode) {
DCHECK_EQ(JumpMode::kJump, jump_mode);
LoadCodeObjectEntry(code_object, code_object);
Jump(code_object);
}

View File

@ -102,7 +102,8 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void LoadEntryFromBuiltinIndex(Register builtin_index);
void LoadCodeObjectEntry(Register destination, Register code_object) override;
void CallCodeObject(Register code_object) override;
void JumpCodeObject(Register code_object) override;
void JumpCodeObject(Register code_object,
JumpMode jump_mode = JumpMode::kJump) override;
void CallBuiltinByIndex(Register builtin_index) override;