| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 __ CallCFunction(ExternalReference::new_deoptimizer_function(), 5); | 360 __ CallCFunction(ExternalReference::new_deoptimizer_function(), 5); |
| 361 | 361 |
| 362 // Preserve "deoptimizer" object in register r0 and get the input | 362 // Preserve "deoptimizer" object in register r0 and get the input |
| 363 // frame descriptor pointer to r1 (deoptimizer->input_); | 363 // frame descriptor pointer to r1 (deoptimizer->input_); |
| 364 __ ldr(r1, MemOperand(r0, Deoptimizer::input_offset())); | 364 __ ldr(r1, MemOperand(r0, Deoptimizer::input_offset())); |
| 365 | 365 |
| 366 | 366 |
| 367 // Copy core registers into FrameDescription::registers_[kNumRegisters]. | 367 // Copy core registers into FrameDescription::registers_[kNumRegisters]. |
| 368 ASSERT(Register::kNumRegisters == kNumberOfRegisters); | 368 ASSERT(Register::kNumRegisters == kNumberOfRegisters); |
| 369 for (int i = 0; i < kNumberOfRegisters; i++) { | 369 for (int i = 0; i < kNumberOfRegisters; i++) { |
| 370 int offset = (i * kIntSize) + FrameDescription::registers_offset(); | 370 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); |
| 371 __ ldr(r2, MemOperand(sp, i * kPointerSize)); | 371 __ ldr(r2, MemOperand(sp, i * kPointerSize)); |
| 372 __ str(r2, MemOperand(r1, offset)); | 372 __ str(r2, MemOperand(r1, offset)); |
| 373 } | 373 } |
| 374 | 374 |
| 375 // Copy VFP registers to | 375 // Copy VFP registers to |
| 376 // double_registers_[DoubleRegister::kNumAllocatableRegisters] | 376 // double_registers_[DoubleRegister::kNumAllocatableRegisters] |
| 377 int double_regs_offset = FrameDescription::double_registers_offset(); | 377 int double_regs_offset = FrameDescription::double_registers_offset(); |
| 378 for (int i = 0; i < DwVfpRegister::kNumAllocatableRegisters; ++i) { | 378 for (int i = 0; i < DwVfpRegister::kNumAllocatableRegisters; ++i) { |
| 379 int dst_offset = i * kDoubleSize + double_regs_offset; | 379 int dst_offset = i * kDoubleSize + double_regs_offset; |
| 380 int src_offset = i * kDoubleSize + kNumberOfRegisters * kPointerSize; | 380 int src_offset = i * kDoubleSize + kNumberOfRegisters * kPointerSize; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 __ push(r6); | 449 __ push(r6); |
| 450 } | 450 } |
| 451 | 451 |
| 452 __ ldr(r6, MemOperand(r2, FrameDescription::pc_offset())); | 452 __ ldr(r6, MemOperand(r2, FrameDescription::pc_offset())); |
| 453 __ push(r6); | 453 __ push(r6); |
| 454 __ ldr(r6, MemOperand(r2, FrameDescription::continuation_offset())); | 454 __ ldr(r6, MemOperand(r2, FrameDescription::continuation_offset())); |
| 455 __ push(r6); | 455 __ push(r6); |
| 456 | 456 |
| 457 // Push the registers from the last output frame. | 457 // Push the registers from the last output frame. |
| 458 for (int i = kNumberOfRegisters - 1; i >= 0; i--) { | 458 for (int i = kNumberOfRegisters - 1; i >= 0; i--) { |
| 459 int offset = (i * kIntSize) + FrameDescription::registers_offset(); | 459 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); |
| 460 __ ldr(r6, MemOperand(r2, offset)); | 460 __ ldr(r6, MemOperand(r2, offset)); |
| 461 __ push(r6); | 461 __ push(r6); |
| 462 } | 462 } |
| 463 | 463 |
| 464 // Restore the registers from the stack. | 464 // Restore the registers from the stack. |
| 465 __ ldm(ia_w, sp, restored_regs); // all but pc registers. | 465 __ ldm(ia_w, sp, restored_regs); // all but pc registers. |
| 466 __ pop(ip); // remove sp | 466 __ pop(ip); // remove sp |
| 467 __ pop(ip); // remove lr | 467 __ pop(ip); // remove lr |
| 468 | 468 |
| 469 // Set up the roots register. | 469 // Set up the roots register. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 495 __ push(ip); | 495 __ push(ip); |
| 496 __ b(&done); | 496 __ b(&done); |
| 497 ASSERT(masm()->pc_offset() - start == table_entry_size_); | 497 ASSERT(masm()->pc_offset() - start == table_entry_size_); |
| 498 } | 498 } |
| 499 __ bind(&done); | 499 __ bind(&done); |
| 500 } | 500 } |
| 501 | 501 |
| 502 #undef __ | 502 #undef __ |
| 503 | 503 |
| 504 } } // namespace v8::internal | 504 } } // namespace v8::internal |
| OLD | NEW |