OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 while (ok && input_offset >= 0) { | 312 while (ok && input_offset >= 0) { |
313 ok = DoOsrTranslateCommand(&iterator, &input_offset); | 313 ok = DoOsrTranslateCommand(&iterator, &input_offset); |
314 } | 314 } |
315 | 315 |
316 // If translation of any command failed, continue using the input frame. | 316 // If translation of any command failed, continue using the input frame. |
317 if (!ok) { | 317 if (!ok) { |
318 delete output_[0]; | 318 delete output_[0]; |
319 output_[0] = input_; | 319 output_[0] = input_; |
320 output_[0]->SetPc(reinterpret_cast<uint32_t>(from_)); | 320 output_[0]->SetPc(reinterpret_cast<uint32_t>(from_)); |
321 } else { | 321 } else { |
322 // Setup the frame pointer and the context pointer. | 322 // Set up the frame pointer and the context pointer. |
323 output_[0]->SetRegister(fp.code(), input_->GetRegister(fp.code())); | 323 output_[0]->SetRegister(fp.code(), input_->GetRegister(fp.code())); |
324 output_[0]->SetRegister(cp.code(), input_->GetRegister(cp.code())); | 324 output_[0]->SetRegister(cp.code(), input_->GetRegister(cp.code())); |
325 | 325 |
326 unsigned pc_offset = data->OsrPcOffset()->value(); | 326 unsigned pc_offset = data->OsrPcOffset()->value(); |
327 uint32_t pc = reinterpret_cast<uint32_t>( | 327 uint32_t pc = reinterpret_cast<uint32_t>( |
328 optimized_code_->entry() + pc_offset); | 328 optimized_code_->entry() + pc_offset); |
329 output_[0]->SetPc(pc); | 329 output_[0]->SetPc(pc); |
330 } | 330 } |
331 Code* continuation = isolate_->builtins()->builtin(Builtins::kNotifyOSR); | 331 Code* continuation = isolate_->builtins()->builtin(Builtins::kNotifyOSR); |
332 output_[0]->SetContinuation( | 332 output_[0]->SetContinuation( |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); | 716 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); |
717 __ ldr(r6, MemOperand(r2, offset)); | 717 __ ldr(r6, MemOperand(r2, offset)); |
718 __ push(r6); | 718 __ push(r6); |
719 } | 719 } |
720 | 720 |
721 // Restore the registers from the stack. | 721 // Restore the registers from the stack. |
722 __ ldm(ia_w, sp, restored_regs); // all but pc registers. | 722 __ ldm(ia_w, sp, restored_regs); // all but pc registers. |
723 __ pop(ip); // remove sp | 723 __ pop(ip); // remove sp |
724 __ pop(ip); // remove lr | 724 __ pop(ip); // remove lr |
725 | 725 |
726 // Set up the roots register. | 726 __ InitializeRootRegister(); |
727 ExternalReference roots_array_start = | |
728 ExternalReference::roots_array_start(isolate); | |
729 __ mov(r10, Operand(roots_array_start)); | |
730 | 727 |
731 __ pop(ip); // remove pc | 728 __ pop(ip); // remove pc |
732 __ pop(r7); // get continuation, leave pc on stack | 729 __ pop(r7); // get continuation, leave pc on stack |
733 __ pop(lr); | 730 __ pop(lr); |
734 __ Jump(r7); | 731 __ Jump(r7); |
735 __ stop("Unreachable."); | 732 __ stop("Unreachable."); |
736 } | 733 } |
737 | 734 |
738 | 735 |
739 void Deoptimizer::TableEntryGenerator::GeneratePrologue() { | 736 void Deoptimizer::TableEntryGenerator::GeneratePrologue() { |
(...skipping 13 matching lines...) Expand all Loading... |
753 __ push(ip); | 750 __ push(ip); |
754 __ b(&done); | 751 __ b(&done); |
755 ASSERT(masm()->pc_offset() - start == table_entry_size_); | 752 ASSERT(masm()->pc_offset() - start == table_entry_size_); |
756 } | 753 } |
757 __ bind(&done); | 754 __ bind(&done); |
758 } | 755 } |
759 | 756 |
760 #undef __ | 757 #undef __ |
761 | 758 |
762 } } // namespace v8::internal | 759 } } // namespace v8::internal |
OLD | NEW |