Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: src/x64/builtins-x64.cc

Issue 11498006: Revert 13157, 13145 and 13140: Crankshaft code stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/code-stubs-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 GenerateMakeCodeYoungAgainCommon(masm); \ 639 GenerateMakeCodeYoungAgainCommon(masm); \
640 } \ 640 } \
641 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ 641 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \
642 MacroAssembler* masm) { \ 642 MacroAssembler* masm) { \
643 GenerateMakeCodeYoungAgainCommon(masm); \ 643 GenerateMakeCodeYoungAgainCommon(masm); \
644 } 644 }
645 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) 645 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR)
646 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR 646 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR
647 647
648 648
649 void Builtins::Generate_NotifyICMiss(MacroAssembler* masm) {
650 // Enter an internal frame.
651 {
652 FrameScope scope(masm, StackFrame::INTERNAL);
653
654 // Preserve registers across notification, this is important for compiled
655 // stubs that tail call the runtime on deopts passing their parameters in
656 // registers.
657 __ Pushad();
658 __ CallRuntime(Runtime::kNotifyICMiss, 0);
659 __ Popad();
660 // Tear down internal frame.
661 }
662
663 __ pop(MemOperand(rsp, 0)); // Ignore state offset
664 __ ret(0); // Return to IC Miss stub, continuation still on stack.
665 }
666
667
668 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, 649 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
669 Deoptimizer::BailoutType type) { 650 Deoptimizer::BailoutType type) {
670 // Enter an internal frame. 651 // Enter an internal frame.
671 { 652 {
672 FrameScope scope(masm, StackFrame::INTERNAL); 653 FrameScope scope(masm, StackFrame::INTERNAL);
673 654
674 // Pass the deoptimization type to the runtime system. 655 // Pass the deoptimization type to the runtime system.
675 __ Push(Smi::FromInt(static_cast<int>(type))); 656 __ Push(Smi::FromInt(static_cast<int>(type)));
676 657
677 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); 658 __ CallRuntime(Runtime::kNotifyDeoptimized, 1);
678 // Tear down internal frame. 659 // Tear down internal frame.
679 } 660 }
680 661
681 // Get the full codegen state from the stack and untag it. 662 // Get the full codegen state from the stack and untag it.
682 __ SmiToInteger32(r10, Operand(rsp, 1 * kPointerSize)); 663 __ SmiToInteger32(rcx, Operand(rsp, 1 * kPointerSize));
683 664
684 // Switch on the state. 665 // Switch on the state.
685 Label not_no_registers, not_tos_rax; 666 Label not_no_registers, not_tos_rax;
686 __ cmpq(r10, Immediate(FullCodeGenerator::NO_REGISTERS)); 667 __ cmpq(rcx, Immediate(FullCodeGenerator::NO_REGISTERS));
687 __ j(not_equal, &not_no_registers, Label::kNear); 668 __ j(not_equal, &not_no_registers, Label::kNear);
688 __ ret(1 * kPointerSize); // Remove state. 669 __ ret(1 * kPointerSize); // Remove state.
689 670
690 __ bind(&not_no_registers); 671 __ bind(&not_no_registers);
691 __ movq(rax, Operand(rsp, 2 * kPointerSize)); 672 __ movq(rax, Operand(rsp, 2 * kPointerSize));
692 __ cmpq(r10, Immediate(FullCodeGenerator::TOS_REG)); 673 __ cmpq(rcx, Immediate(FullCodeGenerator::TOS_REG));
693 __ j(not_equal, &not_tos_rax, Label::kNear); 674 __ j(not_equal, &not_tos_rax, Label::kNear);
694 __ ret(2 * kPointerSize); // Remove state, rax. 675 __ ret(2 * kPointerSize); // Remove state, rax.
695 676
696 __ bind(&not_tos_rax); 677 __ bind(&not_tos_rax);
697 __ Abort("no cases left"); 678 __ Abort("no cases left");
698 } 679 }
699 680
700 void Builtins::Generate_NotifyDeoptimized(MacroAssembler* masm) { 681 void Builtins::Generate_NotifyDeoptimized(MacroAssembler* masm) {
701 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::EAGER); 682 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::EAGER);
702 } 683 }
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1835 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); 1816 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR);
1836 generator.Generate(); 1817 generator.Generate();
1837 } 1818 }
1838 1819
1839 1820
1840 #undef __ 1821 #undef __
1841 1822
1842 } } // namespace v8::internal 1823 } } // namespace v8::internal
1843 1824
1844 #endif // V8_TARGET_ARCH_X64 1825 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/code-stubs-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698