OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 default: | 529 default: |
530 UNREACHABLE(); | 530 UNREACHABLE(); |
531 } | 531 } |
532 element_count_++; | 532 element_count_++; |
533 } | 533 } |
534 | 534 |
535 | 535 |
536 void VirtualFrame::Dup2() { | 536 void VirtualFrame::Dup2() { |
537 if (SpilledScope::is_spilled()) { | 537 if (SpilledScope::is_spilled()) { |
538 __ ldr(ip, MemOperand(sp, kPointerSize)); | 538 __ ldr(ip, MemOperand(sp, kPointerSize)); |
539 EmitPush(ip); | 539 __ push(ip); |
540 __ ldr(ip, MemOperand(sp, kPointerSize)); | 540 __ ldr(ip, MemOperand(sp, kPointerSize)); |
541 EmitPush(ip); | 541 __ push(ip); |
542 } else { | 542 } else { |
543 switch (top_of_stack_state_) { | 543 switch (top_of_stack_state_) { |
544 case NO_TOS_REGISTERS: | 544 case NO_TOS_REGISTERS: |
545 __ ldr(r0, MemOperand(sp, 0)); | 545 __ ldr(r0, MemOperand(sp, 0)); |
546 __ ldr(r1, MemOperand(sp, kPointerSize)); | 546 __ ldr(r1, MemOperand(sp, kPointerSize)); |
547 top_of_stack_state_ = R0_R1_TOS; | 547 top_of_stack_state_ = R0_R1_TOS; |
548 break; | 548 break; |
549 case R0_TOS: | 549 case R0_TOS: |
550 __ push(r0); | 550 __ push(r0); |
551 __ ldr(r1, MemOperand(sp, kPointerSize)); | 551 __ ldr(r1, MemOperand(sp, kPointerSize)); |
552 top_of_stack_state_ = R0_R1_TOS; | 552 top_of_stack_state_ = R0_R1_TOS; |
553 break; | 553 break; |
554 case R1_TOS: | 554 case R1_TOS: |
555 __ push(r1); | 555 __ push(r1); |
556 __ ldr(r0, MemOperand(sp, kPointerSize)); | 556 __ ldr(r0, MemOperand(sp, kPointerSize)); |
557 top_of_stack_state_ = R1_R0_TOS; | 557 top_of_stack_state_ = R1_R0_TOS; |
558 break; | 558 break; |
559 case R0_R1_TOS: | 559 case R0_R1_TOS: |
560 __ push(r1); | 560 __ Push(r1, r0); |
561 __ push(r0); | |
562 top_of_stack_state_ = R0_R1_TOS; | 561 top_of_stack_state_ = R0_R1_TOS; |
563 break; | 562 break; |
564 case R1_R0_TOS: | 563 case R1_R0_TOS: |
565 __ push(r0); | 564 __ Push(r0, r1); |
566 __ push(r1); | |
567 top_of_stack_state_ = R1_R0_TOS; | 565 top_of_stack_state_ = R1_R0_TOS; |
568 break; | 566 break; |
569 default: | 567 default: |
570 UNREACHABLE(); | 568 UNREACHABLE(); |
571 } | 569 } |
572 } | 570 } |
573 element_count_ += 2; | 571 element_count_ += 2; |
574 } | 572 } |
575 | 573 |
576 | 574 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 default: | 703 default: |
706 UNREACHABLE(); | 704 UNREACHABLE(); |
707 break; | 705 break; |
708 } | 706 } |
709 ASSERT(register_allocation_map_ == 0); // Not yet implemented. | 707 ASSERT(register_allocation_map_ == 0); // Not yet implemented. |
710 } | 708 } |
711 | 709 |
712 #undef __ | 710 #undef __ |
713 | 711 |
714 } } // namespace v8::internal | 712 } } // namespace v8::internal |
OLD | NEW |