Index: src/arm/virtual-frame-arm.cc |
=================================================================== |
--- src/arm/virtual-frame-arm.cc (revision 4521) |
+++ src/arm/virtual-frame-arm.cc (working copy) |
@@ -88,7 +88,7 @@ |
break; |
case CASE_NUMBER(NO_TOS_REGISTERS, R1_R0_TOS): |
__ pop(r1); |
- __ pop(r1); |
+ __ pop(r0); |
break; |
case CASE_NUMBER(R0_TOS, NO_TOS_REGISTERS): |
__ push(r0); |
@@ -429,6 +429,35 @@ |
} |
+void VirtualFrame::SpillAllButCopyTOSToR1R0() { |
+ switch (top_of_stack_state_) { |
+ case NO_TOS_REGISTERS: |
+ __ ldr(r1, MemOperand(sp, 0)); |
+ __ ldr(r0, MemOperand(sp, kPointerSize)); |
+ break; |
+ case R0_TOS: |
+ __ push(r0); |
+ __ mov(r1, r0); |
+ __ ldr(r0, MemOperand(sp, kPointerSize)); |
+ break; |
+ case R1_TOS: |
+ __ push(r1); |
+ __ ldr(r0, MemOperand(sp, kPointerSize)); |
+ break; |
+ case R0_R1_TOS: |
+ __ Push(r1, r0); |
+ __ Swap(r0, r1, ip); |
+ break; |
+ case R1_R0_TOS: |
+ __ Push(r0, r1); |
+ break; |
+ default: |
+ UNREACHABLE(); |
+ } |
+ top_of_stack_state_ = NO_TOS_REGISTERS; |
+} |
+ |
+ |
Register VirtualFrame::Peek() { |
AssertIsNotSpilled(); |
if (top_of_stack_state_ == NO_TOS_REGISTERS) { |