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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 __ add(r1, r4, Operand(r1, LSL, 2)); | 261 __ add(r1, r4, Operand(r1, LSL, 2)); |
262 __ jmp(&outer_loop_header); | 262 __ jmp(&outer_loop_header); |
263 __ bind(&outer_push_loop); | 263 __ bind(&outer_push_loop); |
264 // Inner loop state: r2 = current FrameDescription*, r3 = loop index. | 264 // Inner loop state: r2 = current FrameDescription*, r3 = loop index. |
265 __ ldr(r2, MemOperand(r4, 0)); // output_[ix] | 265 __ ldr(r2, MemOperand(r4, 0)); // output_[ix] |
266 __ ldr(r3, MemOperand(r2, FrameDescription::frame_size_offset())); | 266 __ ldr(r3, MemOperand(r2, FrameDescription::frame_size_offset())); |
267 __ jmp(&inner_loop_header); | 267 __ jmp(&inner_loop_header); |
268 __ bind(&inner_push_loop); | 268 __ bind(&inner_push_loop); |
269 __ sub(r3, r3, Operand(sizeof(uint32_t))); | 269 __ sub(r3, r3, Operand(sizeof(uint32_t))); |
270 __ add(r6, r2, Operand(r3)); | 270 __ add(r6, r2, Operand(r3)); |
271 __ ldr(r7, MemOperand(r6, FrameDescription::frame_content_offset())); | 271 __ ldr(r6, MemOperand(r6, FrameDescription::frame_content_offset())); |
272 __ push(r7); | 272 __ push(r6); |
273 __ bind(&inner_loop_header); | 273 __ bind(&inner_loop_header); |
274 __ cmp(r3, Operand::Zero()); | 274 __ cmp(r3, Operand::Zero()); |
275 __ b(ne, &inner_push_loop); // test for gt? | 275 __ b(ne, &inner_push_loop); // test for gt? |
276 __ add(r4, r4, Operand(kPointerSize)); | 276 __ add(r4, r4, Operand(kPointerSize)); |
277 __ bind(&outer_loop_header); | 277 __ bind(&outer_loop_header); |
278 __ cmp(r4, r1); | 278 __ cmp(r4, r1); |
279 __ b(lt, &outer_push_loop); | 279 __ b(lt, &outer_push_loop); |
280 | 280 |
281 // Check CPU flags for number of registers, setting the Z condition flag. | 281 // Check CPU flags for number of registers, setting the Z condition flag. |
282 __ CheckFor32DRegs(ip); | 282 __ CheckFor32DRegs(ip); |
(...skipping 25 matching lines...) Expand all Loading... |
308 } | 308 } |
309 | 309 |
310 // Restore the registers from the stack. | 310 // Restore the registers from the stack. |
311 __ ldm(ia_w, sp, restored_regs); // all but pc registers. | 311 __ ldm(ia_w, sp, restored_regs); // all but pc registers. |
312 __ pop(ip); // remove sp | 312 __ pop(ip); // remove sp |
313 __ pop(ip); // remove lr | 313 __ pop(ip); // remove lr |
314 | 314 |
315 __ InitializeRootRegister(); | 315 __ InitializeRootRegister(); |
316 | 316 |
317 __ pop(ip); // remove pc | 317 __ pop(ip); // remove pc |
318 __ pop(r7); // get continuation, leave pc on stack | 318 __ pop(ip); // get continuation, leave pc on stack |
319 __ pop(lr); | 319 __ pop(lr); |
320 __ Jump(r7); | 320 __ Jump(ip); |
321 __ stop("Unreachable."); | 321 __ stop("Unreachable."); |
322 } | 322 } |
323 | 323 |
324 | 324 |
325 void Deoptimizer::TableEntryGenerator::GeneratePrologue() { | 325 void Deoptimizer::TableEntryGenerator::GeneratePrologue() { |
326 // Create a sequence of deoptimization entries. | 326 // Create a sequence of deoptimization entries. |
327 // Note that registers are still live when jumping to an entry. | 327 // Note that registers are still live when jumping to an entry. |
328 Label done; | 328 Label done; |
329 for (int i = 0; i < count(); i++) { | 329 for (int i = 0; i < count(); i++) { |
330 int start = masm()->pc_offset(); | 330 int start = masm()->pc_offset(); |
(...skipping 13 matching lines...) Expand all Loading... |
344 | 344 |
345 | 345 |
346 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { | 346 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { |
347 SetFrameSlot(offset, value); | 347 SetFrameSlot(offset, value); |
348 } | 348 } |
349 | 349 |
350 | 350 |
351 #undef __ | 351 #undef __ |
352 | 352 |
353 } } // namespace v8::internal | 353 } } // namespace v8::internal |
OLD | NEW |