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

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

Issue 78283002: Restore saved caller FP registers on stub failure (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Port to ia32, arm, and mips Created 7 years, 1 month 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/ia32/macro-assembler-ia32.h ('k') | src/mips/deoptimizer-mips.cc » ('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 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 __ Addu(a0, a0, Operand((kNoCodeAgeSequenceLength) * Assembler::kInstrSize)); 885 __ Addu(a0, a0, Operand((kNoCodeAgeSequenceLength) * Assembler::kInstrSize));
886 __ Jump(a0); 886 __ Jump(a0);
887 } 887 }
888 888
889 889
890 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { 890 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) {
891 GenerateMakeCodeYoungAgainCommon(masm); 891 GenerateMakeCodeYoungAgainCommon(masm);
892 } 892 }
893 893
894 894
895 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { 895 static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
896 SaveFPRegsMode save_doubles) {
896 { 897 {
897 FrameScope scope(masm, StackFrame::INTERNAL); 898 FrameScope scope(masm, StackFrame::INTERNAL);
898 899
899 // Preserve registers across notification, this is important for compiled 900 // Preserve registers across notification, this is important for compiled
900 // stubs that tail call the runtime on deopts passing their parameters in 901 // stubs that tail call the runtime on deopts passing their parameters in
901 // registers. 902 // registers.
902 __ MultiPush(kJSCallerSaved | kCalleeSaved); 903 __ MultiPush(kJSCallerSaved | kCalleeSaved);
903 // Pass the function and deoptimization type to the runtime system. 904 // Pass the function and deoptimization type to the runtime system.
904 __ CallRuntime(Runtime::kNotifyStubFailure, 0); 905 __ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles);
905 __ MultiPop(kJSCallerSaved | kCalleeSaved); 906 __ MultiPop(kJSCallerSaved | kCalleeSaved);
906 } 907 }
907 908
908 __ Addu(sp, sp, Operand(kPointerSize)); // Ignore state 909 __ Addu(sp, sp, Operand(kPointerSize)); // Ignore state
909 __ Jump(ra); // Jump to miss handler 910 __ Jump(ra); // Jump to miss handler
910 } 911 }
911 912
912 913
914 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) {
915 Generate_NotifyStubFailureHelper(masm, kDontSaveFPRegs);
916 }
917
918
919 void Builtins::Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm) {
920 Generate_NotifyStubFailureHelper(masm, kSaveFPRegs);
921 }
922
923
913 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, 924 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
914 Deoptimizer::BailoutType type) { 925 Deoptimizer::BailoutType type) {
915 { 926 {
916 FrameScope scope(masm, StackFrame::INTERNAL); 927 FrameScope scope(masm, StackFrame::INTERNAL);
917 // Pass the function and deoptimization type to the runtime system. 928 // Pass the function and deoptimization type to the runtime system.
918 __ li(a0, Operand(Smi::FromInt(static_cast<int>(type)))); 929 __ li(a0, Operand(Smi::FromInt(static_cast<int>(type))));
919 __ push(a0); 930 __ push(a0);
920 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); 931 __ CallRuntime(Runtime::kNotifyDeoptimized, 1);
921 } 932 }
922 933
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 __ bind(&dont_adapt_arguments); 1518 __ bind(&dont_adapt_arguments);
1508 __ Jump(a3); 1519 __ Jump(a3);
1509 } 1520 }
1510 1521
1511 1522
1512 #undef __ 1523 #undef __
1513 1524
1514 } } // namespace v8::internal 1525 } } // namespace v8::internal
1515 1526
1516 #endif // V8_TARGET_ARCH_MIPS 1527 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/mips/deoptimizer-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698