| 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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 const int kSavedRegistersAreaSize = | 1002 const int kSavedRegistersAreaSize = |
| 1003 (kNumberOfRegisters * kPointerSize) + kDoubleRegsSize; | 1003 (kNumberOfRegisters * kPointerSize) + kDoubleRegsSize; |
| 1004 | 1004 |
| 1005 // Get the bailout id from the stack. | 1005 // Get the bailout id from the stack. |
| 1006 __ ldr(r2, MemOperand(sp, kSavedRegistersAreaSize)); | 1006 __ ldr(r2, MemOperand(sp, kSavedRegistersAreaSize)); |
| 1007 | 1007 |
| 1008 // Get the address of the location in the code object if possible (r3) (return | 1008 // Get the address of the location in the code object if possible (r3) (return |
| 1009 // address for lazy deoptimization) and compute the fp-to-sp delta in | 1009 // address for lazy deoptimization) and compute the fp-to-sp delta in |
| 1010 // register r4. | 1010 // register r4. |
| 1011 if (type() == EAGER) { | 1011 if (type() == EAGER) { |
| 1012 __ mov(r3, Operand(0)); | 1012 __ mov(r3, Operand::Zero()); |
| 1013 // Correct one word for bailout id. | 1013 // Correct one word for bailout id. |
| 1014 __ add(r4, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize))); | 1014 __ add(r4, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize))); |
| 1015 } else if (type() == OSR) { | 1015 } else if (type() == OSR) { |
| 1016 __ mov(r3, lr); | 1016 __ mov(r3, lr); |
| 1017 // Correct one word for bailout id. | 1017 // Correct one word for bailout id. |
| 1018 __ add(r4, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize))); | 1018 __ add(r4, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize))); |
| 1019 } else { | 1019 } else { |
| 1020 __ mov(r3, lr); | 1020 __ mov(r3, lr); |
| 1021 // Correct two words for bailout id and return address. | 1021 // Correct two words for bailout id and return address. |
| 1022 __ add(r4, sp, Operand(kSavedRegistersAreaSize + (2 * kPointerSize))); | 1022 __ add(r4, sp, Operand(kSavedRegistersAreaSize + (2 * kPointerSize))); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 // Inner loop state: r2 = current FrameDescription*, r3 = loop index. | 1117 // Inner loop state: r2 = current FrameDescription*, r3 = loop index. |
| 1118 __ ldr(r2, MemOperand(r0, 0)); // output_[ix] | 1118 __ ldr(r2, MemOperand(r0, 0)); // output_[ix] |
| 1119 __ ldr(r3, MemOperand(r2, FrameDescription::frame_size_offset())); | 1119 __ ldr(r3, MemOperand(r2, FrameDescription::frame_size_offset())); |
| 1120 __ jmp(&inner_loop_header); | 1120 __ jmp(&inner_loop_header); |
| 1121 __ bind(&inner_push_loop); | 1121 __ bind(&inner_push_loop); |
| 1122 __ sub(r3, r3, Operand(sizeof(uint32_t))); | 1122 __ sub(r3, r3, Operand(sizeof(uint32_t))); |
| 1123 __ add(r6, r2, Operand(r3)); | 1123 __ add(r6, r2, Operand(r3)); |
| 1124 __ ldr(r7, MemOperand(r6, FrameDescription::frame_content_offset())); | 1124 __ ldr(r7, MemOperand(r6, FrameDescription::frame_content_offset())); |
| 1125 __ push(r7); | 1125 __ push(r7); |
| 1126 __ bind(&inner_loop_header); | 1126 __ bind(&inner_loop_header); |
| 1127 __ cmp(r3, Operand(0)); | 1127 __ cmp(r3, Operand::Zero()); |
| 1128 __ b(ne, &inner_push_loop); // test for gt? | 1128 __ b(ne, &inner_push_loop); // test for gt? |
| 1129 __ add(r0, r0, Operand(kPointerSize)); | 1129 __ add(r0, r0, Operand(kPointerSize)); |
| 1130 __ bind(&outer_loop_header); | 1130 __ bind(&outer_loop_header); |
| 1131 __ cmp(r0, r1); | 1131 __ cmp(r0, r1); |
| 1132 __ b(lt, &outer_push_loop); | 1132 __ b(lt, &outer_push_loop); |
| 1133 | 1133 |
| 1134 // Push state, pc, and continuation from the last output frame. | 1134 // Push state, pc, and continuation from the last output frame. |
| 1135 if (type() != OSR) { | 1135 if (type() != OSR) { |
| 1136 __ ldr(r6, MemOperand(r2, FrameDescription::state_offset())); | 1136 __ ldr(r6, MemOperand(r2, FrameDescription::state_offset())); |
| 1137 __ push(r6); | 1137 __ push(r6); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1181 __ push(ip); | 1181 __ push(ip); |
| 1182 __ b(&done); | 1182 __ b(&done); |
| 1183 ASSERT(masm()->pc_offset() - start == table_entry_size_); | 1183 ASSERT(masm()->pc_offset() - start == table_entry_size_); |
| 1184 } | 1184 } |
| 1185 __ bind(&done); | 1185 __ bind(&done); |
| 1186 } | 1186 } |
| 1187 | 1187 |
| 1188 #undef __ | 1188 #undef __ |
| 1189 | 1189 |
| 1190 } } // namespace v8::internal | 1190 } } // namespace v8::internal |
| OLD | NEW |