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, ...@@ -173,9 +173,8 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode,
Builtins::IsIsolateIndependentBuiltin(*code)); Builtins::IsIsolateIndependentBuiltin(*code));
int builtin_index = Builtins::kNoBuiltinId; int builtin_index = Builtins::kNoBuiltinId;
bool target_is_isolate_independent_builtin = bool target_is_builtin =
isolate()->builtins()->IsBuiltinHandle(code, &builtin_index) && isolate()->builtins()->IsBuiltinHandle(code, &builtin_index);
Builtins::IsIsolateIndependent(builtin_index);
if (root_array_available_ && options().isolate_independent_code) { if (root_array_available_ && options().isolate_independent_code) {
Label skip; Label skip;
...@@ -187,8 +186,7 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode, ...@@ -187,8 +186,7 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode,
Jump(scratch); Jump(scratch);
bind(&skip); bind(&skip);
return; return;
} else if (options().inline_offheap_trampolines && } else if (options().inline_offheap_trampolines && target_is_builtin) {
target_is_isolate_independent_builtin) {
// Inline the trampoline. // Inline the trampoline.
Label skip; Label skip;
RecordCommentForOffHeapTrampoline(builtin_index); RecordCommentForOffHeapTrampoline(builtin_index);
...@@ -264,9 +262,8 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode, ...@@ -264,9 +262,8 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
Builtins::IsIsolateIndependentBuiltin(*code)); Builtins::IsIsolateIndependentBuiltin(*code));
int builtin_index = Builtins::kNoBuiltinId; int builtin_index = Builtins::kNoBuiltinId;
bool target_is_isolate_independent_builtin = bool target_is_builtin =
isolate()->builtins()->IsBuiltinHandle(code, &builtin_index) && isolate()->builtins()->IsBuiltinHandle(code, &builtin_index);
Builtins::IsIsolateIndependent(builtin_index);
if (root_array_available_ && options().isolate_independent_code) { if (root_array_available_ && options().isolate_independent_code) {
Label skip; Label skip;
...@@ -277,8 +274,7 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode, ...@@ -277,8 +274,7 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
Call(ip); Call(ip);
bind(&skip); bind(&skip);
return; return;
} else if (options().inline_offheap_trampolines && } else if (options().inline_offheap_trampolines && target_is_builtin) {
target_is_isolate_independent_builtin) {
// Inline the trampoline. // Inline the trampoline.
RecordCommentForOffHeapTrampoline(builtin_index); RecordCommentForOffHeapTrampoline(builtin_index);
EmbeddedData d = EmbeddedData::FromBlob(); EmbeddedData d = EmbeddedData::FromBlob();
......
...@@ -174,12 +174,10 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode, ...@@ -174,12 +174,10 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode,
Builtins::IsIsolateIndependentBuiltin(*code)); Builtins::IsIsolateIndependentBuiltin(*code));
int builtin_index = Builtins::kNoBuiltinId; int builtin_index = Builtins::kNoBuiltinId;
bool target_is_isolate_independent_builtin = bool target_is_builtin =
isolate()->builtins()->IsBuiltinHandle(code, &builtin_index) && isolate()->builtins()->IsBuiltinHandle(code, &builtin_index);
Builtins::IsIsolateIndependent(builtin_index);
if (options().inline_offheap_trampolines && if (options().inline_offheap_trampolines && target_is_builtin) {
target_is_isolate_independent_builtin) {
Label skip; Label skip;
if (cond != al) { if (cond != al) {
b(NegateCondition(cond), &skip, Label::kNear); b(NegateCondition(cond), &skip, Label::kNear);
...@@ -242,12 +240,10 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode, ...@@ -242,12 +240,10 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
DCHECK_IMPLIES(options().isolate_independent_code, DCHECK_IMPLIES(options().isolate_independent_code,
Builtins::IsIsolateIndependentBuiltin(*code)); Builtins::IsIsolateIndependentBuiltin(*code));
int builtin_index = Builtins::kNoBuiltinId; int builtin_index = Builtins::kNoBuiltinId;
bool target_is_isolate_independent_builtin = bool target_is_builtin =
isolate()->builtins()->IsBuiltinHandle(code, &builtin_index) && isolate()->builtins()->IsBuiltinHandle(code, &builtin_index);
Builtins::IsIsolateIndependent(builtin_index);
if (options().inline_offheap_trampolines && if (options().inline_offheap_trampolines && target_is_builtin) {
target_is_isolate_independent_builtin) {
// Inline the trampoline. // Inline the trampoline.
RecordCommentForOffHeapTrampoline(builtin_index); RecordCommentForOffHeapTrampoline(builtin_index);
CHECK_NE(builtin_index, Builtins::kNoBuiltinId); CHECK_NE(builtin_index, Builtins::kNoBuiltinId);
......
...@@ -1152,7 +1152,6 @@ void RegExpMacroAssemblerPPC::CallCheckStackGuardState(Register scratch) { ...@@ -1152,7 +1152,6 @@ void RegExpMacroAssemblerPPC::CallCheckStackGuardState(Register scratch) {
__ mov(ip, Operand(stack_guard_check)); __ mov(ip, Operand(stack_guard_check));
EmbeddedData d = EmbeddedData::FromBlob(); EmbeddedData d = EmbeddedData::FromBlob();
CHECK(Builtins::IsIsolateIndependent(Builtins::kDirectCEntry));
Address entry = d.InstructionStartOfBuiltin(Builtins::kDirectCEntry); Address entry = d.InstructionStartOfBuiltin(Builtins::kDirectCEntry);
__ mov(r0, Operand(entry, RelocInfo::OFF_HEAP_TARGET)); __ mov(r0, Operand(entry, RelocInfo::OFF_HEAP_TARGET));
__ Call(r0); __ 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