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

Side by Side Diff: src/arm/builtins-arm.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/arguments.cc ('k') | src/arm/deoptimizer-arm.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 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 __ add(r0, r0, Operand(kNoCodeAgeSequenceLength * Assembler::kInstrSize)); 850 __ add(r0, r0, Operand(kNoCodeAgeSequenceLength * Assembler::kInstrSize));
851 __ mov(pc, r0); 851 __ mov(pc, r0);
852 } 852 }
853 853
854 854
855 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { 855 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) {
856 GenerateMakeCodeYoungAgainCommon(masm); 856 GenerateMakeCodeYoungAgainCommon(masm);
857 } 857 }
858 858
859 859
860 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { 860 static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
861 SaveFPRegsMode save_doubles) {
861 { 862 {
862 FrameScope scope(masm, StackFrame::INTERNAL); 863 FrameScope scope(masm, StackFrame::INTERNAL);
863 864
864 // Preserve registers across notification, this is important for compiled 865 // Preserve registers across notification, this is important for compiled
865 // stubs that tail call the runtime on deopts passing their parameters in 866 // stubs that tail call the runtime on deopts passing their parameters in
866 // registers. 867 // registers.
867 __ stm(db_w, sp, kJSCallerSaved | kCalleeSaved); 868 __ stm(db_w, sp, kJSCallerSaved | kCalleeSaved);
868 // Pass the function and deoptimization type to the runtime system. 869 // Pass the function and deoptimization type to the runtime system.
869 __ CallRuntime(Runtime::kNotifyStubFailure, 0); 870 __ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles);
870 __ ldm(ia_w, sp, kJSCallerSaved | kCalleeSaved); 871 __ ldm(ia_w, sp, kJSCallerSaved | kCalleeSaved);
871 } 872 }
872 873
873 __ add(sp, sp, Operand(kPointerSize)); // Ignore state 874 __ add(sp, sp, Operand(kPointerSize)); // Ignore state
874 __ mov(pc, lr); // Jump to miss handler 875 __ mov(pc, lr); // Jump to miss handler
875 } 876 }
876 877
877 878
879 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) {
880 Generate_NotifyStubFailureHelper(masm, kDontSaveFPRegs);
881 }
882
883
884 void Builtins::Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm) {
885 Generate_NotifyStubFailureHelper(masm, kSaveFPRegs);
886 }
887
888
878 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, 889 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
879 Deoptimizer::BailoutType type) { 890 Deoptimizer::BailoutType type) {
880 { 891 {
881 FrameScope scope(masm, StackFrame::INTERNAL); 892 FrameScope scope(masm, StackFrame::INTERNAL);
882 // Pass the function and deoptimization type to the runtime system. 893 // Pass the function and deoptimization type to the runtime system.
883 __ mov(r0, Operand(Smi::FromInt(static_cast<int>(type)))); 894 __ mov(r0, Operand(Smi::FromInt(static_cast<int>(type))));
884 __ push(r0); 895 __ push(r0);
885 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); 896 __ CallRuntime(Runtime::kNotifyDeoptimized, 1);
886 } 897 }
887 898
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 __ bind(&dont_adapt_arguments); 1476 __ bind(&dont_adapt_arguments);
1466 __ Jump(r3); 1477 __ Jump(r3);
1467 } 1478 }
1468 1479
1469 1480
1470 #undef __ 1481 #undef __
1471 1482
1472 } } // namespace v8::internal 1483 } } // namespace v8::internal
1473 1484
1474 #endif // V8_TARGET_ARCH_ARM 1485 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arguments.cc ('k') | src/arm/deoptimizer-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698