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

Side by Side Diff: src/arm/deoptimizer-arm.cc

Issue 21063002: Out-of-line constant pool on Arm: Stage 1 - Free up r7 for use as constant pool pointer register (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix typo Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 __ add(r1, r4, Operand(r1, LSL, 2)); 556 __ add(r1, r4, Operand(r1, LSL, 2));
557 __ jmp(&outer_loop_header); 557 __ jmp(&outer_loop_header);
558 __ bind(&outer_push_loop); 558 __ bind(&outer_push_loop);
559 // Inner loop state: r2 = current FrameDescription*, r3 = loop index. 559 // Inner loop state: r2 = current FrameDescription*, r3 = loop index.
560 __ ldr(r2, MemOperand(r4, 0)); // output_[ix] 560 __ ldr(r2, MemOperand(r4, 0)); // output_[ix]
561 __ ldr(r3, MemOperand(r2, FrameDescription::frame_size_offset())); 561 __ ldr(r3, MemOperand(r2, FrameDescription::frame_size_offset()));
562 __ jmp(&inner_loop_header); 562 __ jmp(&inner_loop_header);
563 __ bind(&inner_push_loop); 563 __ bind(&inner_push_loop);
564 __ sub(r3, r3, Operand(sizeof(uint32_t))); 564 __ sub(r3, r3, Operand(sizeof(uint32_t)));
565 __ add(r6, r2, Operand(r3)); 565 __ add(r6, r2, Operand(r3));
566 __ ldr(r7, MemOperand(r6, FrameDescription::frame_content_offset())); 566 __ ldr(r6, MemOperand(r6, FrameDescription::frame_content_offset()));
567 __ push(r7); 567 __ push(r6);
568 __ bind(&inner_loop_header); 568 __ bind(&inner_loop_header);
569 __ cmp(r3, Operand::Zero()); 569 __ cmp(r3, Operand::Zero());
570 __ b(ne, &inner_push_loop); // test for gt? 570 __ b(ne, &inner_push_loop); // test for gt?
571 __ add(r4, r4, Operand(kPointerSize)); 571 __ add(r4, r4, Operand(kPointerSize));
572 __ bind(&outer_loop_header); 572 __ bind(&outer_loop_header);
573 __ cmp(r4, r1); 573 __ cmp(r4, r1);
574 __ b(lt, &outer_push_loop); 574 __ b(lt, &outer_push_loop);
575 575
576 // Check CPU flags for number of registers, setting the Z condition flag. 576 // Check CPU flags for number of registers, setting the Z condition flag.
577 __ CheckFor32DRegs(ip); 577 __ CheckFor32DRegs(ip);
(...skipping 28 matching lines...) Expand all
606 } 606 }
607 607
608 // Restore the registers from the stack. 608 // Restore the registers from the stack.
609 __ ldm(ia_w, sp, restored_regs); // all but pc registers. 609 __ ldm(ia_w, sp, restored_regs); // all but pc registers.
610 __ pop(ip); // remove sp 610 __ pop(ip); // remove sp
611 __ pop(ip); // remove lr 611 __ pop(ip); // remove lr
612 612
613 __ InitializeRootRegister(); 613 __ InitializeRootRegister();
614 614
615 __ pop(ip); // remove pc 615 __ pop(ip); // remove pc
616 __ pop(r7); // get continuation, leave pc on stack 616 __ pop(ip); // get continuation, leave pc on stack
617 __ pop(lr); 617 __ pop(lr);
618 __ Jump(r7); 618 __ Jump(ip);
619 __ stop("Unreachable."); 619 __ stop("Unreachable.");
620 } 620 }
621 621
622 622
623 void Deoptimizer::TableEntryGenerator::GeneratePrologue() { 623 void Deoptimizer::TableEntryGenerator::GeneratePrologue() {
624 // Create a sequence of deoptimization entries. 624 // Create a sequence of deoptimization entries.
625 // Note that registers are still live when jumping to an entry. 625 // Note that registers are still live when jumping to an entry.
626 Label done; 626 Label done;
627 for (int i = 0; i < count(); i++) { 627 for (int i = 0; i < count(); i++) {
628 int start = masm()->pc_offset(); 628 int start = masm()->pc_offset();
629 USE(start); 629 USE(start);
630 __ mov(ip, Operand(i)); 630 __ mov(ip, Operand(i));
631 __ push(ip); 631 __ push(ip);
632 __ b(&done); 632 __ b(&done);
633 ASSERT(masm()->pc_offset() - start == table_entry_size_); 633 ASSERT(masm()->pc_offset() - start == table_entry_size_);
634 } 634 }
635 __ bind(&done); 635 __ bind(&done);
636 } 636 }
637 637
638 #undef __ 638 #undef __
639 639
640 } } // namespace v8::internal 640 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698