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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 __ str(r5, MemOperand(sp, 1 * kPointerSize)); // Isolate. | 604 __ str(r5, MemOperand(sp, 1 * kPointerSize)); // Isolate. |
605 // Call Deoptimizer::New(). | 605 // Call Deoptimizer::New(). |
606 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6); | 606 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6); |
607 | 607 |
608 // Preserve "deoptimizer" object in register r0 and get the input | 608 // Preserve "deoptimizer" object in register r0 and get the input |
609 // frame descriptor pointer to r1 (deoptimizer->input_); | 609 // frame descriptor pointer to r1 (deoptimizer->input_); |
610 __ ldr(r1, MemOperand(r0, Deoptimizer::input_offset())); | 610 __ ldr(r1, MemOperand(r0, Deoptimizer::input_offset())); |
611 | 611 |
612 // Copy core registers into FrameDescription::registers_[kNumRegisters]. | 612 // Copy core registers into FrameDescription::registers_[kNumRegisters]. |
613 ASSERT(Register::kNumRegisters == kNumberOfRegisters); | 613 ASSERT(Register::kNumRegisters == kNumberOfRegisters); |
614 ASSERT(kNumberOfRegisters % 2 == 0); | 614 for (int i = 0; i < kNumberOfRegisters; i++) { |
615 | 615 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); |
616 Label arm_loop; | 616 __ ldr(r2, MemOperand(sp, i * kPointerSize)); |
617 __ add(r6, r1, Operand(FrameDescription::registers_offset())); | 617 __ str(r2, MemOperand(r1, offset)); |
618 __ mov(r5, Operand(sp)); | 618 } |
619 __ mov(r4, Operand(kNumberOfRegisters / 2)); | |
620 | |
621 __ bind(&arm_loop); | |
622 __ Ldrd(r2, r3, MemOperand(r5, kPointerSize * 2, PostIndex)); | |
623 __ sub(r4, r4, Operand(1), SetCC); | |
624 __ Strd(r2, r3, MemOperand(r6, kPointerSize * 2, PostIndex)); | |
625 __ b(gt, &arm_loop); | |
626 | 619 |
627 // Copy VFP registers to | 620 // Copy VFP registers to |
628 // double_registers_[DoubleRegister::kNumAllocatableRegisters] | 621 // double_registers_[DoubleRegister::kNumAllocatableRegisters] |
629 Label vfp_loop; | 622 int double_regs_offset = FrameDescription::double_registers_offset(); |
630 __ add(r6, r1, Operand(FrameDescription::double_registers_offset())); | 623 for (int i = 0; i < DwVfpRegister::kNumAllocatableRegisters; ++i) { |
631 __ mov(r4, Operand(DwVfpRegister::kNumAllocatableRegisters)); | 624 int dst_offset = i * kDoubleSize + double_regs_offset; |
632 | 625 int src_offset = i * kDoubleSize + kNumberOfRegisters * kPointerSize; |
633 __ bind(&vfp_loop); | 626 __ vldr(d0, sp, src_offset); |
634 __ Ldrd(r2, r3, MemOperand(r5, kDoubleSize, PostIndex)); | 627 __ vstr(d0, r1, dst_offset); |
635 __ sub(r4, r4, Operand(1), SetCC); | 628 } |
636 __ Strd(r2, r3, MemOperand(r6, kDoubleSize, PostIndex)); | |
637 __ b(gt, &vfp_loop); | |
638 | 629 |
639 // Remove the bailout id, eventually return address, and the saved registers | 630 // Remove the bailout id, eventually return address, and the saved registers |
640 // from the stack. | 631 // from the stack. |
641 if (type() == EAGER || type() == OSR) { | 632 if (type() == EAGER || type() == OSR) { |
642 __ add(sp, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize))); | 633 __ add(sp, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize))); |
643 } else { | 634 } else { |
644 __ add(sp, sp, Operand(kSavedRegistersAreaSize + (2 * kPointerSize))); | 635 __ add(sp, sp, Operand(kSavedRegistersAreaSize + (2 * kPointerSize))); |
645 } | 636 } |
646 | 637 |
647 // Compute a pointer to the unwinding limit in register r2; that is | 638 // Compute a pointer to the unwinding limit in register r2; that is |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 __ push(ip); | 736 __ push(ip); |
746 __ b(&done); | 737 __ b(&done); |
747 ASSERT(masm()->pc_offset() - start == table_entry_size_); | 738 ASSERT(masm()->pc_offset() - start == table_entry_size_); |
748 } | 739 } |
749 __ bind(&done); | 740 __ bind(&done); |
750 } | 741 } |
751 | 742 |
752 #undef __ | 743 #undef __ |
753 | 744 |
754 } } // namespace v8::internal | 745 } } // namespace v8::internal |
OLD | NEW |