| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 __ Add(x0, x0, kCodeAgeSequenceSize); | 840 __ Add(x0, x0, kCodeAgeSequenceSize); |
| 841 __ Br(x0); | 841 __ Br(x0); |
| 842 } | 842 } |
| 843 | 843 |
| 844 | 844 |
| 845 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { | 845 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { |
| 846 GenerateMakeCodeYoungAgainCommon(masm); | 846 GenerateMakeCodeYoungAgainCommon(masm); |
| 847 } | 847 } |
| 848 | 848 |
| 849 | 849 |
| 850 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { | 850 static void Generate_NotifyStubFailureHelper(MacroAssembler* masm, |
| 851 SaveFPRegsMode save_doubles) { |
| 851 { | 852 { |
| 852 FrameScope scope(masm, StackFrame::INTERNAL); | 853 FrameScope scope(masm, StackFrame::INTERNAL); |
| 853 | 854 |
| 854 // Preserve registers across notification, this is important for compiled | 855 // Preserve registers across notification, this is important for compiled |
| 855 // stubs that tail call the runtime on deopts passing their parameters in | 856 // stubs that tail call the runtime on deopts passing their parameters in |
| 856 // registers. | 857 // registers. |
| 857 // TODO(jbramley): Is it correct (and appropriate) to use safepoint | 858 // TODO(jbramley): Is it correct (and appropriate) to use safepoint |
| 858 // registers here? According to the comment above, we should only need to | 859 // registers here? According to the comment above, we should only need to |
| 859 // preserve the registers with parameters. | 860 // preserve the registers with parameters. |
| 860 __ PushXRegList(kSafepointSavedRegisters); | 861 __ PushXRegList(kSafepointSavedRegisters); |
| 861 // Pass the function and deoptimization type to the runtime system. | 862 // Pass the function and deoptimization type to the runtime system. |
| 862 __ CallRuntime(Runtime::kNotifyStubFailure, 0); | 863 __ CallRuntime(Runtime::kNotifyStubFailure, 0); |
| 863 __ PopXRegList(kSafepointSavedRegisters); | 864 __ PopXRegList(kSafepointSavedRegisters); |
| 864 } | 865 } |
| 865 | 866 |
| 866 // Ignore state (pushed by Deoptimizer::EntryGenerator::Generate). | 867 // Ignore state (pushed by Deoptimizer::EntryGenerator::Generate). |
| 867 __ Drop(1); | 868 __ Drop(1); |
| 868 | 869 |
| 869 // Jump to the miss handler. Deoptimizer::EntryGenerator::Generate loads this | 870 // Jump to the miss handler. Deoptimizer::EntryGenerator::Generate loads this |
| 870 // into lr before it jumps here. | 871 // into lr before it jumps here. |
| 871 __ Br(lr); | 872 __ Br(lr); |
| 872 } | 873 } |
| 873 | 874 |
| 874 | 875 |
| 876 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { |
| 877 Generate_NotifyStubFailureHelper(masm, kDontSaveFPRegs); |
| 878 } |
| 879 |
| 880 |
| 881 void Builtins::Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm) { |
| 882 Generate_NotifyStubFailureHelper(masm, kSaveFPRegs); |
| 883 } |
| 884 |
| 885 |
| 875 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, | 886 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, |
| 876 Deoptimizer::BailoutType type) { | 887 Deoptimizer::BailoutType type) { |
| 877 { | 888 { |
| 878 FrameScope scope(masm, StackFrame::INTERNAL); | 889 FrameScope scope(masm, StackFrame::INTERNAL); |
| 879 // Pass the deoptimization type to the runtime system. | 890 // Pass the deoptimization type to the runtime system. |
| 880 __ Mov(x0, Operand(Smi::FromInt(static_cast<int>(type)))); | 891 __ Mov(x0, Operand(Smi::FromInt(static_cast<int>(type)))); |
| 881 __ Push(x0); | 892 __ Push(x0); |
| 882 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); | 893 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); |
| 883 } | 894 } |
| 884 | 895 |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1477 __ Bind(&dont_adapt_arguments); | 1488 __ Bind(&dont_adapt_arguments); |
| 1478 __ Jump(x3); | 1489 __ Jump(x3); |
| 1479 } | 1490 } |
| 1480 | 1491 |
| 1481 | 1492 |
| 1482 #undef __ | 1493 #undef __ |
| 1483 | 1494 |
| 1484 } } // namespace v8::internal | 1495 } } // namespace v8::internal |
| 1485 | 1496 |
| 1486 #endif // V8_TARGET_ARCH_ARM | 1497 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |