| 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 // Jump to point after the code-age stub. | 644 // Jump to point after the code-age stub. |
| 645 __ ret(0); | 645 __ ret(0); |
| 646 } | 646 } |
| 647 | 647 |
| 648 | 648 |
| 649 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { | 649 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { |
| 650 GenerateMakeCodeYoungAgainCommon(masm); | 650 GenerateMakeCodeYoungAgainCommon(masm); |
| 651 } | 651 } |
| 652 | 652 |
| 653 | 653 |
| 654 static void Generate_NotifyStubFailureHelper(MacroAssembler* masm, | 654 static void Generate_NotifyStubFailureHelper(MacroAssembler* masm) { |
| 655 SaveFPRegsMode save_doubles) { | |
| 656 // Enter an internal frame. | 655 // Enter an internal frame. |
| 657 { | 656 { |
| 658 FrameScope scope(masm, StackFrame::INTERNAL); | 657 FrameScope scope(masm, StackFrame::INTERNAL); |
| 659 | 658 |
| 660 // Preserve registers across notification, this is important for compiled | 659 // Preserve registers across notification, this is important for compiled |
| 661 // stubs that tail call the runtime on deopts passing their parameters in | 660 // stubs that tail call the runtime on deopts passing their parameters in |
| 662 // registers. | 661 // registers. |
| 663 __ pushad(); | 662 __ pushad(); |
| 664 __ CallRuntime(Runtime::kHiddenNotifyStubFailure, 0, save_doubles); | 663 __ CallRuntime(Runtime::kHiddenNotifyStubFailure, 0); |
| 665 __ popad(); | 664 __ popad(); |
| 666 // Tear down internal frame. | 665 // Tear down internal frame. |
| 667 } | 666 } |
| 668 | 667 |
| 669 __ pop(MemOperand(esp, 0)); // Ignore state offset | 668 __ pop(MemOperand(esp, 0)); // Ignore state offset |
| 670 __ ret(0); // Return to IC Miss stub, continuation still on stack. | 669 __ ret(0); // Return to IC Miss stub, continuation still on stack. |
| 671 } | 670 } |
| 672 | 671 |
| 673 | 672 |
| 674 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { | 673 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { |
| 675 Generate_NotifyStubFailureHelper(masm, kDontSaveFPRegs); | 674 Generate_NotifyStubFailureHelper(masm); |
| 676 } | 675 } |
| 677 | 676 |
| 678 | 677 |
| 679 void Builtins::Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm) { | 678 void Builtins::Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm) { |
| 680 Generate_NotifyStubFailureHelper(masm, kSaveFPRegs); | 679 // SaveDoubles is meanless for X87, just used by deoptimizer.cc |
| 680 Generate_NotifyStubFailureHelper(masm); |
| 681 } | 681 } |
| 682 | 682 |
| 683 | 683 |
| 684 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, | 684 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, |
| 685 Deoptimizer::BailoutType type) { | 685 Deoptimizer::BailoutType type) { |
| 686 { | 686 { |
| 687 FrameScope scope(masm, StackFrame::INTERNAL); | 687 FrameScope scope(masm, StackFrame::INTERNAL); |
| 688 | 688 |
| 689 // Pass deoptimization type to the runtime system. | 689 // Pass deoptimization type to the runtime system. |
| 690 __ push(Immediate(Smi::FromInt(static_cast<int>(type)))); | 690 __ push(Immediate(Smi::FromInt(static_cast<int>(type)))); |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 RelocInfo::CODE_TARGET); | 1433 RelocInfo::CODE_TARGET); |
| 1434 | 1434 |
| 1435 __ bind(&ok); | 1435 __ bind(&ok); |
| 1436 __ ret(0); | 1436 __ ret(0); |
| 1437 } | 1437 } |
| 1438 | 1438 |
| 1439 #undef __ | 1439 #undef __ |
| 1440 } | 1440 } |
| 1441 } // namespace v8::internal | 1441 } // namespace v8::internal |
| 1442 | 1442 |
| 1443 #endif // V8_TARGET_ARCH_IA32 | 1443 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |