Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: src/a64/deoptimizer-a64.cc

Issue 151373004: A64: Restore FP registers in Deoptimizer::EntryGenerator::Generate (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/a64/assembler-a64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/deoptimizer-a64.cc
diff --git a/src/a64/deoptimizer-a64.cc b/src/a64/deoptimizer-a64.cc
index 95c5d3b1adde2fa1e50aed8b2b88b3c45a70e883..5416b669abc81133973c4b7e98753a85b06e8cb2 100644
--- a/src/a64/deoptimizer-a64.cc
+++ b/src/a64/deoptimizer-a64.cc
@@ -486,6 +486,7 @@ void Deoptimizer::EntryGenerator::Generate() {
ExternalReference::compute_output_frames_function(isolate()), 1);
}
__ Pop(x0); // Restore deoptimizer object (class Deoptimizer).
+ __ Mov(x4, x0);
Rodolph Perfetta (ARM) 2014/01/31 14:50:28 Pop directly into x4 and update the two loads belo
// Replace the current (input) frame with the output frames.
Label outer_push_loop, inner_push_loop,
@@ -514,8 +515,17 @@ void Deoptimizer::EntryGenerator::Generate() {
__ Cmp(x0, x1);
__ B(lt, &outer_push_loop);
- // TODO(jbramley): The ARM code restores FP registers here.
- TODO_UNIMPLEMENTED("EntryGenerator::Generate: Restore FP registers.");
+ __ Ldr(x1, MemOperand(x4, Deoptimizer::input_offset()));
+ int src_offset = FrameDescription::double_registers_offset();
+ for (unsigned i = 0; i < kNumberOfFPRegisters; ++i) {
Rodolph Perfetta (ARM) 2014/01/31 14:50:28 This loop could be rewritten with CPURegList: CPU
+ if (i == crankshaft_fp_scratch.code()) continue;
+ if (i == fp_zero.code()) continue;
+ if (i == fp_scratch.code()) continue;
+
+ const FPRegister reg = FPRegister::from_code(i);
Rodolph Perfetta (ARM) 2014/01/31 14:50:28 const FPRegister&
+ __ Ldr(reg, MemOperand(x1, src_offset));
Rodolph Perfetta (ARM) 2014/01/31 14:50:28 maybe add a todo to insider ldp later on.
+ src_offset += kDoubleSize;
+ }
// Push state, pc, and continuation from the last output frame.
if (type() != OSR) {
« no previous file with comments | « src/a64/assembler-a64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698