| 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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 // Jump to point after the code-age stub. | 655 // Jump to point after the code-age stub. |
| 656 __ ret(0); | 656 __ ret(0); |
| 657 } | 657 } |
| 658 | 658 |
| 659 | 659 |
| 660 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { | 660 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { |
| 661 GenerateMakeCodeYoungAgainCommon(masm); | 661 GenerateMakeCodeYoungAgainCommon(masm); |
| 662 } | 662 } |
| 663 | 663 |
| 664 | 664 |
| 665 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { | 665 static void Generate_NotifyStubFailureHelper(MacroAssembler* masm, |
| 666 SaveFPRegsMode save_doubles) { |
| 666 // Enter an internal frame. | 667 // Enter an internal frame. |
| 667 { | 668 { |
| 668 FrameScope scope(masm, StackFrame::INTERNAL); | 669 FrameScope scope(masm, StackFrame::INTERNAL); |
| 669 | 670 |
| 670 // Preserve registers across notification, this is important for compiled | 671 // Preserve registers across notification, this is important for compiled |
| 671 // stubs that tail call the runtime on deopts passing their parameters in | 672 // stubs that tail call the runtime on deopts passing their parameters in |
| 672 // registers. | 673 // registers. |
| 673 __ Pushad(); | 674 __ Pushad(); |
| 674 __ CallRuntime(Runtime::kNotifyStubFailure, 0); | 675 __ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles); |
| 675 __ Popad(); | 676 __ Popad(); |
| 676 // Tear down internal frame. | 677 // Tear down internal frame. |
| 677 } | 678 } |
| 678 | 679 |
| 679 __ pop(MemOperand(rsp, 0)); // Ignore state offset | 680 __ pop(MemOperand(rsp, 0)); // Ignore state offset |
| 680 __ ret(0); // Return to IC Miss stub, continuation still on stack. | 681 __ ret(0); // Return to IC Miss stub, continuation still on stack. |
| 681 } | 682 } |
| 682 | 683 |
| 683 | 684 |
| 685 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { |
| 686 Generate_NotifyStubFailureHelper(masm, kDontSaveFPRegs); |
| 687 } |
| 688 |
| 689 |
| 690 void Builtins::Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm) { |
| 691 Generate_NotifyStubFailureHelper(masm, kSaveFPRegs); |
| 692 } |
| 693 |
| 694 |
| 684 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, | 695 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, |
| 685 Deoptimizer::BailoutType type) { | 696 Deoptimizer::BailoutType type) { |
| 686 // Enter an internal frame. | 697 // Enter an internal frame. |
| 687 { | 698 { |
| 688 FrameScope scope(masm, StackFrame::INTERNAL); | 699 FrameScope scope(masm, StackFrame::INTERNAL); |
| 689 | 700 |
| 690 // Pass the deoptimization type to the runtime system. | 701 // Pass the deoptimization type to the runtime system. |
| 691 __ Push(Smi::FromInt(static_cast<int>(type))); | 702 __ Push(Smi::FromInt(static_cast<int>(type))); |
| 692 | 703 |
| 693 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); | 704 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1436 __ bind(&ok); | 1447 __ bind(&ok); |
| 1437 __ ret(0); | 1448 __ ret(0); |
| 1438 } | 1449 } |
| 1439 | 1450 |
| 1440 | 1451 |
| 1441 #undef __ | 1452 #undef __ |
| 1442 | 1453 |
| 1443 } } // namespace v8::internal | 1454 } } // namespace v8::internal |
| 1444 | 1455 |
| 1445 #endif // V8_TARGET_ARCH_X64 | 1456 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |