PPC/s390: [cleanup] Various misc. cleanups

Port dcf467a84a

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/+/2483628
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#70614}
This commit is contained in:
Milad Fa 2020-10-19 13:12:28 +00:00 committed by Commit Bot
parent 6b045152d6
commit 9da11d2de9
3 changed files with 12 additions and 21 deletions

View File

@ -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();

View File

@ -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);

View File

@ -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);