OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "codegen.h" | 9 #include "codegen.h" |
10 #include "deoptimizer.h" | 10 #include "deoptimizer.h" |
11 #include "full-codegen.h" | 11 #include "full-codegen.h" |
12 #include "stub-cache.h" | 12 #include "stub-cache.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 | 16 |
17 | 17 |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 // Jump to point after the code-age stub. | 653 // Jump to point after the code-age stub. |
654 __ ret(0); | 654 __ ret(0); |
655 } | 655 } |
656 | 656 |
657 | 657 |
658 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { | 658 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { |
659 GenerateMakeCodeYoungAgainCommon(masm); | 659 GenerateMakeCodeYoungAgainCommon(masm); |
660 } | 660 } |
661 | 661 |
662 | 662 |
663 static void Generate_NotifyStubFailureHelper(MacroAssembler* masm, | 663 static void Generate_NotifyStubFailureHelper(MacroAssembler* masm) { |
664 SaveFPRegsMode save_doubles) { | |
665 // Enter an internal frame. | 664 // Enter an internal frame. |
666 { | 665 { |
667 FrameScope scope(masm, StackFrame::INTERNAL); | 666 FrameScope scope(masm, StackFrame::INTERNAL); |
668 | 667 |
669 // Preserve registers across notification, this is important for compiled | 668 // Preserve registers across notification, this is important for compiled |
670 // stubs that tail call the runtime on deopts passing their parameters in | 669 // stubs that tail call the runtime on deopts passing their parameters in |
671 // registers. | 670 // registers. |
672 __ pushad(); | 671 __ pushad(); |
673 __ CallRuntime(Runtime::kHiddenNotifyStubFailure, 0, save_doubles); | 672 __ CallRuntime(Runtime::kHiddenNotifyStubFailure, 0); |
674 __ popad(); | 673 __ popad(); |
675 // Tear down internal frame. | 674 // Tear down internal frame. |
676 } | 675 } |
677 | 676 |
678 __ pop(MemOperand(esp, 0)); // Ignore state offset | 677 __ pop(MemOperand(esp, 0)); // Ignore state offset |
679 __ ret(0); // Return to IC Miss stub, continuation still on stack. | 678 __ ret(0); // Return to IC Miss stub, continuation still on stack. |
680 } | 679 } |
681 | 680 |
682 | 681 |
683 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { | 682 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { |
684 Generate_NotifyStubFailureHelper(masm, kDontSaveFPRegs); | 683 Generate_NotifyStubFailureHelper(masm); |
685 } | 684 } |
686 | 685 |
687 | 686 |
688 void Builtins::Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm) { | 687 void Builtins::Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm) { |
689 Generate_NotifyStubFailureHelper(masm, kSaveFPRegs); | 688 // SaveDoubles is meanless for X87, just used by deoptimizer.cc |
| 689 Generate_NotifyStubFailureHelper(masm); |
690 } | 690 } |
691 | 691 |
692 | 692 |
693 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, | 693 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, |
694 Deoptimizer::BailoutType type) { | 694 Deoptimizer::BailoutType type) { |
695 { | 695 { |
696 FrameScope scope(masm, StackFrame::INTERNAL); | 696 FrameScope scope(masm, StackFrame::INTERNAL); |
697 | 697 |
698 // Pass deoptimization type to the runtime system. | 698 // Pass deoptimization type to the runtime system. |
699 __ push(Immediate(Smi::FromInt(static_cast<int>(type)))); | 699 __ push(Immediate(Smi::FromInt(static_cast<int>(type)))); |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1442 RelocInfo::CODE_TARGET); | 1442 RelocInfo::CODE_TARGET); |
1443 | 1443 |
1444 __ bind(&ok); | 1444 __ bind(&ok); |
1445 __ ret(0); | 1445 __ ret(0); |
1446 } | 1446 } |
1447 | 1447 |
1448 #undef __ | 1448 #undef __ |
1449 } | 1449 } |
1450 } // namespace v8::internal | 1450 } // namespace v8::internal |
1451 | 1451 |
1452 #endif // V8_TARGET_ARCH_IA32 | 1452 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |