Chromium Code Reviews| 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) { |