OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 __ mov(Operand(esp, 3 * kPointerSize), ecx); // Code address or 0. | 501 __ mov(Operand(esp, 3 * kPointerSize), ecx); // Code address or 0. |
502 __ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta. | 502 __ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta. |
503 __ CallCFunction(ExternalReference::new_deoptimizer_function(), 5); | 503 __ CallCFunction(ExternalReference::new_deoptimizer_function(), 5); |
504 | 504 |
505 // Preserve deoptimizer object in register eax and get the input | 505 // Preserve deoptimizer object in register eax and get the input |
506 // frame descriptor pointer. | 506 // frame descriptor pointer. |
507 __ mov(ebx, Operand(eax, Deoptimizer::input_offset())); | 507 __ mov(ebx, Operand(eax, Deoptimizer::input_offset())); |
508 | 508 |
509 // Fill in the input registers. | 509 // Fill in the input registers. |
510 for (int i = 0; i < kNumberOfRegisters; i++) { | 510 for (int i = 0; i < kNumberOfRegisters; i++) { |
511 int offset = (i * kIntSize) + FrameDescription::registers_offset(); | 511 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); |
512 __ mov(ecx, Operand(esp, (kNumberOfRegisters - 1 - i) * kPointerSize)); | 512 __ mov(ecx, Operand(esp, (kNumberOfRegisters - 1 - i) * kPointerSize)); |
513 __ mov(Operand(ebx, offset), ecx); | 513 __ mov(Operand(ebx, offset), ecx); |
514 } | 514 } |
515 | 515 |
516 // Fill in the double input registers. | 516 // Fill in the double input registers. |
517 int double_regs_offset = FrameDescription::double_registers_offset(); | 517 int double_regs_offset = FrameDescription::double_registers_offset(); |
518 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) { | 518 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) { |
519 int dst_offset = i * kDoubleSize + double_regs_offset; | 519 int dst_offset = i * kDoubleSize + double_regs_offset; |
520 int src_offset = i * kDoubleSize + kNumberOfRegisters * kPointerSize; | 520 int src_offset = i * kDoubleSize + kNumberOfRegisters * kPointerSize; |
521 __ movdbl(xmm0, Operand(esp, src_offset)); | 521 __ movdbl(xmm0, Operand(esp, src_offset)); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 // Push state, pc, and continuation from the last output frame. | 584 // Push state, pc, and continuation from the last output frame. |
585 if (type() != OSR) { | 585 if (type() != OSR) { |
586 __ push(Operand(ebx, FrameDescription::state_offset())); | 586 __ push(Operand(ebx, FrameDescription::state_offset())); |
587 } | 587 } |
588 __ push(Operand(ebx, FrameDescription::pc_offset())); | 588 __ push(Operand(ebx, FrameDescription::pc_offset())); |
589 __ push(Operand(ebx, FrameDescription::continuation_offset())); | 589 __ push(Operand(ebx, FrameDescription::continuation_offset())); |
590 | 590 |
591 | 591 |
592 // Push the registers from the last output frame. | 592 // Push the registers from the last output frame. |
593 for (int i = 0; i < kNumberOfRegisters; i++) { | 593 for (int i = 0; i < kNumberOfRegisters; i++) { |
594 int offset = (i * kIntSize) + FrameDescription::registers_offset(); | 594 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); |
595 __ push(Operand(ebx, offset)); | 595 __ push(Operand(ebx, offset)); |
596 } | 596 } |
597 | 597 |
598 // Restore the registers from the stack. | 598 // Restore the registers from the stack. |
599 __ popad(); | 599 __ popad(); |
600 | 600 |
601 // Return to the continuation point. | 601 // Return to the continuation point. |
602 __ ret(0); | 602 __ ret(0); |
603 } | 603 } |
604 | 604 |
(...skipping 10 matching lines...) Expand all Loading... |
615 } | 615 } |
616 __ bind(&done); | 616 __ bind(&done); |
617 } | 617 } |
618 | 618 |
619 #undef __ | 619 #undef __ |
620 | 620 |
621 | 621 |
622 } } // namespace v8::internal | 622 } } // namespace v8::internal |
623 | 623 |
624 #endif // V8_TARGET_ARCH_IA32 | 624 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |