[ia32] Implement PC-relative calls for snapshot code
Bug: v8:6666 Change-Id: I3e89fd09e2c8de568bf5dffdad3a5d8a9ef39ff5 Reviewed-on: https://chromium-review.googlesource.com/c/1286676 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#56744}
This commit is contained in:
parent
63ca293dcf
commit
60f94823d2
@ -1899,7 +1899,7 @@ void TurboAssembler::Call(Handle<Code> code_object, RelocInfo::Mode rmode) {
|
||||
if (FLAG_embedded_builtins) {
|
||||
// TODO(jgruber): Pc-relative builtin-to-builtin calls.
|
||||
if (root_array_available_ && ShouldGenerateIsolateIndependentCode() &&
|
||||
Builtins::IsBuiltin(*code_object)) {
|
||||
!Builtins::IsIsolateIndependentBuiltin(*code_object)) {
|
||||
// Since we don't have a scratch register available we call through a
|
||||
// so-called virtual register.
|
||||
// TODO(v8:6666): Remove once pc-relative jumps are supported on ia32.
|
||||
@ -1934,7 +1934,7 @@ void TurboAssembler::Jump(Handle<Code> code_object, RelocInfo::Mode rmode) {
|
||||
if (FLAG_embedded_builtins) {
|
||||
// TODO(jgruber): Pc-relative builtin-to-builtin calls.
|
||||
if (root_array_available_ && ShouldGenerateIsolateIndependentCode() &&
|
||||
Builtins::IsBuiltin(*code_object)) {
|
||||
!Builtins::IsIsolateIndependentBuiltin(*code_object)) {
|
||||
// Since we don't have a scratch register available we call through a
|
||||
// so-called virtual register.
|
||||
// TODO(v8:6666): Remove once pc-relative jumps are supported on ia32.
|
||||
|
@ -14618,8 +14618,9 @@ bool Code::IsIsolateIndependent(Isolate* isolate) {
|
||||
bool is_process_independent = true;
|
||||
for (RelocIterator it(this, mode_mask); !it.done(); it.next()) {
|
||||
#if defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_ARM64) || \
|
||||
defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
|
||||
// On X64, ARM, ARM64, MIPS we emit relative builtin-to-builtin
|
||||
defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) || \
|
||||
defined(V8_TARGET_ARCH_IA32)
|
||||
// On these platforms we emit relative builtin-to-builtin
|
||||
// jumps for isolate independent builtins in the snapshot. They are later
|
||||
// rewritten as pc-relative jumps to the off-heap instruction stream and are
|
||||
// thus process-independent. See also: FinalizeEmbeddedCodeTargets.
|
||||
|
@ -351,8 +351,9 @@ void FinalizeEmbeddedCodeTargets(Isolate* isolate, EmbeddedData* blob) {
|
||||
RelocIterator off_heap_it(blob, code, kRelocMask);
|
||||
|
||||
#if defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_ARM64) || \
|
||||
defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
|
||||
// On X64, ARM, ARM64, MIPS we emit relative builtin-to-builtin
|
||||
defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) || \
|
||||
defined(V8_TARGET_ARCH_IA32)
|
||||
// On these platforms we emit relative builtin-to-builtin
|
||||
// jumps for isolate independent builtins in the snapshot. This fixes up the
|
||||
// relative jumps to the right offsets in the snapshot.
|
||||
// See also: Code::IsIsolateIndependent.
|
||||
|
Loading…
Reference in New Issue
Block a user