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

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

Issue 264823004: MIPS: Fix for 3303 MultithreadedParallelIsolates has a race condition. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months 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/mips/assembler-mips-inl.h ('k') | src/mips/codegen-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 // 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 5
6 6
7 #include "v8.h" 7 #include "v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 858
859 static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) { 859 static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) {
860 // For now, we are relying on the fact that make_code_young doesn't do any 860 // For now, we are relying on the fact that make_code_young doesn't do any
861 // garbage collection which allows us to save/restore the registers without 861 // garbage collection which allows us to save/restore the registers without
862 // worrying about which of them contain pointers. We also don't build an 862 // worrying about which of them contain pointers. We also don't build an
863 // internal frame to make the code faster, since we shouldn't have to do stack 863 // internal frame to make the code faster, since we shouldn't have to do stack
864 // crawls in MakeCodeYoung. This seems a bit fragile. 864 // crawls in MakeCodeYoung. This seems a bit fragile.
865 865
866 // Set a0 to point to the head of the PlatformCodeAge sequence. 866 // Set a0 to point to the head of the PlatformCodeAge sequence.
867 __ Subu(a0, a0, 867 __ Subu(a0, a0,
868 Operand((kNoCodeAgeSequenceLength - 1) * Assembler::kInstrSize)); 868 Operand(kNoCodeAgeSequenceLength - Assembler::kInstrSize));
869 869
870 // The following registers must be saved and restored when calling through to 870 // The following registers must be saved and restored when calling through to
871 // the runtime: 871 // the runtime:
872 // a0 - contains return address (beginning of patch sequence) 872 // a0 - contains return address (beginning of patch sequence)
873 // a1 - isolate 873 // a1 - isolate
874 RegList saved_regs = 874 RegList saved_regs =
875 (a0.bit() | a1.bit() | ra.bit() | fp.bit()) & ~sp.bit(); 875 (a0.bit() | a1.bit() | ra.bit() | fp.bit()) & ~sp.bit();
876 FrameScope scope(masm, StackFrame::MANUAL); 876 FrameScope scope(masm, StackFrame::MANUAL);
877 __ MultiPush(saved_regs); 877 __ MultiPush(saved_regs);
878 __ PrepareCallCFunction(2, 0, a2); 878 __ PrepareCallCFunction(2, 0, a2);
(...skipping 18 matching lines...) Expand all
897 897
898 898
899 void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) { 899 void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) {
900 // For now, as in GenerateMakeCodeYoungAgainCommon, we are relying on the fact 900 // For now, as in GenerateMakeCodeYoungAgainCommon, we are relying on the fact
901 // that make_code_young doesn't do any garbage collection which allows us to 901 // that make_code_young doesn't do any garbage collection which allows us to
902 // save/restore the registers without worrying about which of them contain 902 // save/restore the registers without worrying about which of them contain
903 // pointers. 903 // pointers.
904 904
905 // Set a0 to point to the head of the PlatformCodeAge sequence. 905 // Set a0 to point to the head of the PlatformCodeAge sequence.
906 __ Subu(a0, a0, 906 __ Subu(a0, a0,
907 Operand((kNoCodeAgeSequenceLength - 1) * Assembler::kInstrSize)); 907 Operand(kNoCodeAgeSequenceLength - Assembler::kInstrSize));
908 908
909 // The following registers must be saved and restored when calling through to 909 // The following registers must be saved and restored when calling through to
910 // the runtime: 910 // the runtime:
911 // a0 - contains return address (beginning of patch sequence) 911 // a0 - contains return address (beginning of patch sequence)
912 // a1 - isolate 912 // a1 - isolate
913 RegList saved_regs = 913 RegList saved_regs =
914 (a0.bit() | a1.bit() | ra.bit() | fp.bit()) & ~sp.bit(); 914 (a0.bit() | a1.bit() | ra.bit() | fp.bit()) & ~sp.bit();
915 FrameScope scope(masm, StackFrame::MANUAL); 915 FrameScope scope(masm, StackFrame::MANUAL);
916 __ MultiPush(saved_regs); 916 __ MultiPush(saved_regs);
917 __ PrepareCallCFunction(2, 0, a2); 917 __ PrepareCallCFunction(2, 0, a2);
918 __ li(a1, Operand(ExternalReference::isolate_address(masm->isolate()))); 918 __ li(a1, Operand(ExternalReference::isolate_address(masm->isolate())));
919 __ CallCFunction( 919 __ CallCFunction(
920 ExternalReference::get_mark_code_as_executed_function(masm->isolate()), 920 ExternalReference::get_mark_code_as_executed_function(masm->isolate()),
921 2); 921 2);
922 __ MultiPop(saved_regs); 922 __ MultiPop(saved_regs);
923 923
924 // Perform prologue operations usually performed by the young code stub. 924 // Perform prologue operations usually performed by the young code stub.
925 __ Push(ra, fp, cp, a1); 925 __ Push(ra, fp, cp, a1);
926 __ Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); 926 __ Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
927 927
928 // Jump to point after the code-age stub. 928 // Jump to point after the code-age stub.
929 __ Addu(a0, a0, Operand((kNoCodeAgeSequenceLength) * Assembler::kInstrSize)); 929 __ Addu(a0, a0, Operand(kNoCodeAgeSequenceLength));
930 __ Jump(a0); 930 __ Jump(a0);
931 } 931 }
932 932
933 933
934 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { 934 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) {
935 GenerateMakeCodeYoungAgainCommon(masm); 935 GenerateMakeCodeYoungAgainCommon(masm);
936 } 936 }
937 937
938 938
939 static void Generate_NotifyStubFailureHelper(MacroAssembler* masm, 939 static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 __ break_(0xCC); 1570 __ break_(0xCC);
1571 } 1571 }
1572 } 1572 }
1573 1573
1574 1574
1575 #undef __ 1575 #undef __
1576 1576
1577 } } // namespace v8::internal 1577 } } // namespace v8::internal
1578 1578
1579 #endif // V8_TARGET_ARCH_MIPS 1579 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/assembler-mips-inl.h ('k') | src/mips/codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698