[root] Reinitialize root register in deoptimizer
Bug: v8:6666, v8:7777 Change-Id: I0d1306bb96e12c81e876888b0ca69cae5855fbc3 Reviewed-on: https://chromium-review.googlesource.com/c/1273100 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#56678}
This commit is contained in:
parent
1e586c3c70
commit
18c135b1a4
@ -221,8 +221,6 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
// Restore the registers from the stack.
|
||||
__ ldm(ia_w, sp, restored_regs); // all but pc registers.
|
||||
|
||||
__ InitializeRootRegister();
|
||||
|
||||
// Remove sp, lr and pc.
|
||||
__ Drop(3);
|
||||
{
|
||||
|
@ -271,7 +271,6 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
__ Ldr(continuation, MemOperand(last_output_frame,
|
||||
FrameDescription::continuation_offset()));
|
||||
__ Ldr(lr, MemOperand(last_output_frame, FrameDescription::pc_offset()));
|
||||
__ InitializeRootRegister();
|
||||
__ Br(continuation);
|
||||
}
|
||||
|
||||
|
@ -809,6 +809,20 @@ void Deoptimizer::DoComputeOutputFrames() {
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(V8_TARGET_ARCH_IA32)
|
||||
constexpr bool kShouldInitializeRootRegister = FLAG_embedded_builtins;
|
||||
#else
|
||||
constexpr bool kShouldInitializeRootRegister = true;
|
||||
#endif
|
||||
if (kShouldInitializeRootRegister) {
|
||||
Address root_pointer =
|
||||
reinterpret_cast<Address>(isolate()->roots_array_start()) +
|
||||
kRootRegisterBias;
|
||||
FrameDescription* topmost = output_[count - 1];
|
||||
topmost->GetRegisterValues()->SetRegister(kRootRegister.code(),
|
||||
root_pointer);
|
||||
}
|
||||
|
||||
// Print some helpful diagnostic information.
|
||||
if (trace_scope_ != nullptr) {
|
||||
double ms = timer.Elapsed().InMillisecondsF();
|
||||
|
@ -226,8 +226,6 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
}
|
||||
}
|
||||
|
||||
__ InitializeRootRegister();
|
||||
|
||||
__ pop(at); // Get continuation, leave pc on stack.
|
||||
__ pop(ra);
|
||||
__ Jump(at);
|
||||
|
@ -224,8 +224,6 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
}
|
||||
}
|
||||
|
||||
__ InitializeRootRegister();
|
||||
|
||||
__ pop(at); // Get continuation, leave pc on stack.
|
||||
__ pop(ra);
|
||||
__ Jump(at);
|
||||
|
@ -218,8 +218,6 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
}
|
||||
}
|
||||
|
||||
__ InitializeRootRegister();
|
||||
|
||||
__ pop(ip); // get continuation, leave pc on stack
|
||||
__ pop(r0);
|
||||
__ mtlr(r0);
|
||||
|
@ -224,8 +224,6 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
}
|
||||
}
|
||||
|
||||
__ InitializeRootRegister();
|
||||
|
||||
__ pop(ip); // get continuation, leave pc on stack
|
||||
__ pop(r14);
|
||||
__ Jump(ip);
|
||||
|
@ -234,9 +234,6 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
__ popq(r);
|
||||
}
|
||||
|
||||
// Set up the roots register.
|
||||
__ InitializeRootRegister();
|
||||
|
||||
// Return to the continuation point.
|
||||
__ ret(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user