Commit 9da11d2d authored by Milad Fa's avatar Milad Fa Committed by Commit Bot

PPC/s390: [cleanup] Various misc. cleanups

Port dcf467a8

Original Commit Message:

    - Use kNoBuiltinId instead of literal -1.
    - Remove support for non-embedded builtins.
    - Update Code object layout comment.

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

Change-Id: Ie0101d883c8116a6076a7b9ef8b82dbcd1960dbf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2483628Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#70614}
parent 6b045152
......@@ -173,9 +173,8 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode,
Builtins::IsIsolateIndependentBuiltin(*code));
int builtin_index = Builtins::kNoBuiltinId;
bool target_is_isolate_independent_builtin =
isolate()->builtins()->IsBuiltinHandle(code, &builtin_index) &&
Builtins::IsIsolateIndependent(builtin_index);
bool target_is_builtin =
isolate()->builtins()->IsBuiltinHandle(code, &builtin_index);
if (root_array_available_ && options().isolate_independent_code) {
Label skip;
......@@ -187,8 +186,7 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode,
Jump(scratch);
bind(&skip);
return;
} else if (options().inline_offheap_trampolines &&
target_is_isolate_independent_builtin) {
} else if (options().inline_offheap_trampolines && target_is_builtin) {
// Inline the trampoline.
Label skip;
RecordCommentForOffHeapTrampoline(builtin_index);
......@@ -264,9 +262,8 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
Builtins::IsIsolateIndependentBuiltin(*code));
int builtin_index = Builtins::kNoBuiltinId;
bool target_is_isolate_independent_builtin =
isolate()->builtins()->IsBuiltinHandle(code, &builtin_index) &&
Builtins::IsIsolateIndependent(builtin_index);
bool target_is_builtin =
isolate()->builtins()->IsBuiltinHandle(code, &builtin_index);
if (root_array_available_ && options().isolate_independent_code) {
Label skip;
......@@ -277,8 +274,7 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
Call(ip);
bind(&skip);
return;
} else if (options().inline_offheap_trampolines &&
target_is_isolate_independent_builtin) {
} else if (options().inline_offheap_trampolines && target_is_builtin) {
// Inline the trampoline.
RecordCommentForOffHeapTrampoline(builtin_index);
EmbeddedData d = EmbeddedData::FromBlob();
......
......@@ -174,12 +174,10 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode,
Builtins::IsIsolateIndependentBuiltin(*code));
int builtin_index = Builtins::kNoBuiltinId;
bool target_is_isolate_independent_builtin =
isolate()->builtins()->IsBuiltinHandle(code, &builtin_index) &&
Builtins::IsIsolateIndependent(builtin_index);
bool target_is_builtin =
isolate()->builtins()->IsBuiltinHandle(code, &builtin_index);
if (options().inline_offheap_trampolines &&
target_is_isolate_independent_builtin) {
if (options().inline_offheap_trampolines && target_is_builtin) {
Label skip;
if (cond != al) {
b(NegateCondition(cond), &skip, Label::kNear);
......@@ -242,12 +240,10 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
DCHECK_IMPLIES(options().isolate_independent_code,
Builtins::IsIsolateIndependentBuiltin(*code));
int builtin_index = Builtins::kNoBuiltinId;
bool target_is_isolate_independent_builtin =
isolate()->builtins()->IsBuiltinHandle(code, &builtin_index) &&
Builtins::IsIsolateIndependent(builtin_index);
bool target_is_builtin =
isolate()->builtins()->IsBuiltinHandle(code, &builtin_index);
if (options().inline_offheap_trampolines &&
target_is_isolate_independent_builtin) {
if (options().inline_offheap_trampolines && target_is_builtin) {
// Inline the trampoline.
RecordCommentForOffHeapTrampoline(builtin_index);
CHECK_NE(builtin_index, Builtins::kNoBuiltinId);
......
......@@ -1152,7 +1152,6 @@ void RegExpMacroAssemblerPPC::CallCheckStackGuardState(Register scratch) {
__ mov(ip, Operand(stack_guard_check));
EmbeddedData d = EmbeddedData::FromBlob();
CHECK(Builtins::IsIsolateIndependent(Builtins::kDirectCEntry));
Address entry = d.InstructionStartOfBuiltin(Builtins::kDirectCEntry);
__ mov(r0, Operand(entry, RelocInfo::OFF_HEAP_TARGET));
__ Call(r0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment