| 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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 GenerateMakeCodeYoungAgainCommon(masm); \ | 618 GenerateMakeCodeYoungAgainCommon(masm); \ |
| 619 } \ | 619 } \ |
| 620 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ | 620 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ |
| 621 MacroAssembler* masm) { \ | 621 MacroAssembler* masm) { \ |
| 622 GenerateMakeCodeYoungAgainCommon(masm); \ | 622 GenerateMakeCodeYoungAgainCommon(masm); \ |
| 623 } | 623 } |
| 624 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) | 624 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) |
| 625 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR | 625 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR |
| 626 | 626 |
| 627 | 627 |
| 628 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { | 628 static void Generate_NotifyStubFailureHelper(MacroAssembler* masm, |
| 629 SaveFPRegsMode save_doubles) { |
| 629 // Enter an internal frame. | 630 // Enter an internal frame. |
| 630 { | 631 { |
| 631 FrameScope scope(masm, StackFrame::INTERNAL); | 632 FrameScope scope(masm, StackFrame::INTERNAL); |
| 632 | 633 |
| 633 // Preserve registers across notification, this is important for compiled | 634 // Preserve registers across notification, this is important for compiled |
| 634 // stubs that tail call the runtime on deopts passing their parameters in | 635 // stubs that tail call the runtime on deopts passing their parameters in |
| 635 // registers. | 636 // registers. |
| 636 __ Pushad(); | 637 __ Pushad(); |
| 637 __ CallRuntime(Runtime::kNotifyStubFailure, 0); | 638 __ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles); |
| 638 __ Popad(); | 639 __ Popad(); |
| 639 // Tear down internal frame. | 640 // Tear down internal frame. |
| 640 } | 641 } |
| 641 | 642 |
| 642 __ pop(MemOperand(rsp, 0)); // Ignore state offset | 643 __ pop(MemOperand(rsp, 0)); // Ignore state offset |
| 643 __ ret(0); // Return to IC Miss stub, continuation still on stack. | 644 __ ret(0); // Return to IC Miss stub, continuation still on stack. |
| 644 } | 645 } |
| 645 | 646 |
| 646 | 647 |
| 648 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { |
| 649 Generate_NotifyStubFailureHelper(masm, kDontSaveFPRegs); |
| 650 } |
| 651 |
| 652 |
| 653 void Builtins::Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm) { |
| 654 Generate_NotifyStubFailureHelper(masm, kSaveFPRegs); |
| 655 } |
| 656 |
| 657 |
| 647 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, | 658 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, |
| 648 Deoptimizer::BailoutType type) { | 659 Deoptimizer::BailoutType type) { |
| 649 // Enter an internal frame. | 660 // Enter an internal frame. |
| 650 { | 661 { |
| 651 FrameScope scope(masm, StackFrame::INTERNAL); | 662 FrameScope scope(masm, StackFrame::INTERNAL); |
| 652 | 663 |
| 653 // Pass the deoptimization type to the runtime system. | 664 // Pass the deoptimization type to the runtime system. |
| 654 __ Push(Smi::FromInt(static_cast<int>(type))); | 665 __ Push(Smi::FromInt(static_cast<int>(type))); |
| 655 | 666 |
| 656 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); | 667 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 // And "return" to the OSR entry point of the function. | 1410 // And "return" to the OSR entry point of the function. |
| 1400 __ ret(0); | 1411 __ ret(0); |
| 1401 } | 1412 } |
| 1402 | 1413 |
| 1403 | 1414 |
| 1404 #undef __ | 1415 #undef __ |
| 1405 | 1416 |
| 1406 } } // namespace v8::internal | 1417 } } // namespace v8::internal |
| 1407 | 1418 |
| 1408 #endif // V8_TARGET_ARCH_X64 | 1419 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |