OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 __ add(r1, r4, Operand(r1, LSL, 2)); | 523 __ add(r1, r4, Operand(r1, LSL, 2)); |
524 __ jmp(&outer_loop_header); | 524 __ jmp(&outer_loop_header); |
525 __ bind(&outer_push_loop); | 525 __ bind(&outer_push_loop); |
526 // Inner loop state: r2 = current FrameDescription*, r3 = loop index. | 526 // Inner loop state: r2 = current FrameDescription*, r3 = loop index. |
527 __ ldr(r2, MemOperand(r4, 0)); // output_[ix] | 527 __ ldr(r2, MemOperand(r4, 0)); // output_[ix] |
528 __ ldr(r3, MemOperand(r2, FrameDescription::frame_size_offset())); | 528 __ ldr(r3, MemOperand(r2, FrameDescription::frame_size_offset())); |
529 __ jmp(&inner_loop_header); | 529 __ jmp(&inner_loop_header); |
530 __ bind(&inner_push_loop); | 530 __ bind(&inner_push_loop); |
531 __ sub(r3, r3, Operand(sizeof(uint32_t))); | 531 __ sub(r3, r3, Operand(sizeof(uint32_t))); |
532 __ add(r6, r2, Operand(r3)); | 532 __ add(r6, r2, Operand(r3)); |
533 __ ldr(r7, MemOperand(r6, FrameDescription::frame_content_offset())); | 533 __ ldr(r6, MemOperand(r6, FrameDescription::frame_content_offset())); |
534 __ push(r7); | 534 __ push(r6); |
535 __ bind(&inner_loop_header); | 535 __ bind(&inner_loop_header); |
536 __ cmp(r3, Operand::Zero()); | 536 __ cmp(r3, Operand::Zero()); |
537 __ b(ne, &inner_push_loop); // test for gt? | 537 __ b(ne, &inner_push_loop); // test for gt? |
538 __ add(r4, r4, Operand(kPointerSize)); | 538 __ add(r4, r4, Operand(kPointerSize)); |
539 __ bind(&outer_loop_header); | 539 __ bind(&outer_loop_header); |
540 __ cmp(r4, r1); | 540 __ cmp(r4, r1); |
541 __ b(lt, &outer_push_loop); | 541 __ b(lt, &outer_push_loop); |
542 | 542 |
543 // Check CPU flags for number of registers, setting the Z condition flag. | 543 // Check CPU flags for number of registers, setting the Z condition flag. |
544 __ CheckFor32DRegs(ip); | 544 __ CheckFor32DRegs(ip); |
(...skipping 28 matching lines...) Expand all Loading... |
573 } | 573 } |
574 | 574 |
575 // Restore the registers from the stack. | 575 // Restore the registers from the stack. |
576 __ ldm(ia_w, sp, restored_regs); // all but pc registers. | 576 __ ldm(ia_w, sp, restored_regs); // all but pc registers. |
577 __ pop(ip); // remove sp | 577 __ pop(ip); // remove sp |
578 __ pop(ip); // remove lr | 578 __ pop(ip); // remove lr |
579 | 579 |
580 __ InitializeRootRegister(); | 580 __ InitializeRootRegister(); |
581 | 581 |
582 __ pop(ip); // remove pc | 582 __ pop(ip); // remove pc |
583 __ pop(r7); // get continuation, leave pc on stack | 583 __ pop(ip); // get continuation, leave pc on stack |
584 __ pop(lr); | 584 __ pop(lr); |
585 __ Jump(r7); | 585 __ Jump(ip); |
586 __ stop("Unreachable."); | 586 __ stop("Unreachable."); |
587 } | 587 } |
588 | 588 |
589 | 589 |
590 void Deoptimizer::TableEntryGenerator::GeneratePrologue() { | 590 void Deoptimizer::TableEntryGenerator::GeneratePrologue() { |
591 // Create a sequence of deoptimization entries. | 591 // Create a sequence of deoptimization entries. |
592 // Note that registers are still live when jumping to an entry. | 592 // Note that registers are still live when jumping to an entry. |
593 Label done; | 593 Label done; |
594 for (int i = 0; i < count(); i++) { | 594 for (int i = 0; i < count(); i++) { |
595 int start = masm()->pc_offset(); | 595 int start = masm()->pc_offset(); |
(...skipping 13 matching lines...) Expand all Loading... |
609 | 609 |
610 | 610 |
611 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { | 611 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { |
612 SetFrameSlot(offset, value); | 612 SetFrameSlot(offset, value); |
613 } | 613 } |
614 | 614 |
615 | 615 |
616 #undef __ | 616 #undef __ |
617 | 617 |
618 } } // namespace v8::internal | 618 } } // namespace v8::internal |
OLD | NEW |