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

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

Issue 10701054: Enable stub generation using Hydrogen/Lithium (again) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merge with latest 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
649 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, 668 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
650 Deoptimizer::BailoutType type) { 669 Deoptimizer::BailoutType type) {
651 // Enter an internal frame. 670 // Enter an internal frame.
652 { 671 {
653 FrameScope scope(masm, StackFrame::INTERNAL); 672 FrameScope scope(masm, StackFrame::INTERNAL);
654 673
655 // Pass the deoptimization type to the runtime system. 674 // Pass the deoptimization type to the runtime system.
656 __ Push(Smi::FromInt(static_cast<int>(type))); 675 __ Push(Smi::FromInt(static_cast<int>(type)));
657 676
658 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); 677 __ CallRuntime(Runtime::kNotifyDeoptimized, 1);
659 // Tear down internal frame. 678 // Tear down internal frame.
660 } 679 }
661 680
662 // Get the full codegen state from the stack and untag it. 681 // Get the full codegen state from the stack and untag it.
663 __ SmiToInteger32(rcx, Operand(rsp, 1 * kPointerSize)); 682 __ SmiToInteger32(r10, Operand(rsp, 1 * kPointerSize));
664 683
665 // Switch on the state. 684 // Switch on the state.
666 Label not_no_registers, not_tos_rax; 685 Label not_no_registers, not_tos_rax;
667 __ cmpq(rcx, Immediate(FullCodeGenerator::NO_REGISTERS)); 686 __ cmpq(r10, Immediate(FullCodeGenerator::NO_REGISTERS));
668 __ j(not_equal, &not_no_registers, Label::kNear); 687 __ j(not_equal, &not_no_registers, Label::kNear);
669 __ ret(1 * kPointerSize); // Remove state. 688 __ ret(1 * kPointerSize); // Remove state.
670 689
671 __ bind(&not_no_registers); 690 __ bind(&not_no_registers);
672 __ movq(rax, Operand(rsp, 2 * kPointerSize)); 691 __ movq(rax, Operand(rsp, 2 * kPointerSize));
673 __ cmpq(rcx, Immediate(FullCodeGenerator::TOS_REG)); 692 __ cmpq(r10, Immediate(FullCodeGenerator::TOS_REG));
674 __ j(not_equal, &not_tos_rax, Label::kNear); 693 __ j(not_equal, &not_tos_rax, Label::kNear);
675 __ ret(2 * kPointerSize); // Remove state, rax. 694 __ ret(2 * kPointerSize); // Remove state, rax.
676 695
677 __ bind(&not_tos_rax); 696 __ bind(&not_tos_rax);
678 __ Abort("no cases left"); 697 __ Abort("no cases left");
679 } 698 }
680 699
681 void Builtins::Generate_NotifyDeoptimized(MacroAssembler* masm) { 700 void Builtins::Generate_NotifyDeoptimized(MacroAssembler* masm) {
682 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::EAGER); 701 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::EAGER);
683 } 702 }
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); 1835 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR);
1817 generator.Generate(); 1836 generator.Generate();
1818 } 1837 }
1819 1838
1820 1839
1821 #undef __ 1840 #undef __
1822 1841
1823 } } // namespace v8::internal 1842 } } // namespace v8::internal
1824 1843
1825 #endif // V8_TARGET_ARCH_X64 1844 #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