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

Side by Side Diff: runtime/vm/intrinsifier_mips.cc

Issue 1295823003: VM: Cache instructions entry point in RawFunction/RawCode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/intrinsifier_x64.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2134 __ addu(T2, T2, T1); 2134 __ addu(T2, T2, T1);
2135 __ lw(T0, FieldAddress(T2, JSRegExp::function_offset(kOneByteStringCid))); 2135 __ lw(T0, FieldAddress(T2, JSRegExp::function_offset(kOneByteStringCid)));
2136 2136
2137 // Registers are now set up for the lazy compile stub. It expects the function 2137 // Registers are now set up for the lazy compile stub. It expects the function
2138 // in T0, the argument descriptor in S4, and IC-Data in S5. 2138 // in T0, the argument descriptor in S4, and IC-Data in S5.
2139 static const intptr_t arg_count = RegExpMacroAssembler::kParamCount; 2139 static const intptr_t arg_count = RegExpMacroAssembler::kParamCount;
2140 __ LoadObject(S4, Array::Handle(ArgumentsDescriptor::New(arg_count))); 2140 __ LoadObject(S4, Array::Handle(ArgumentsDescriptor::New(arg_count)));
2141 __ mov(S5, ZR); 2141 __ mov(S5, ZR);
2142 2142
2143 // Tail-call the function. 2143 // Tail-call the function.
2144 __ lw(T3, FieldAddress(T0, Function::instructions_offset())); 2144 __ lw(T3, FieldAddress(T0, Function::entry_point_offset()));
2145 __ AddImmediate(T3, Instructions::HeaderSize() - kHeapObjectTag);
2146 __ jr(T3); 2145 __ jr(T3);
2147 } 2146 }
2148 2147
2149 2148
2150 // On stack: user tag (+0). 2149 // On stack: user tag (+0).
2151 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) { 2150 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) {
2152 // T1: Isolate. 2151 // T1: Isolate.
2153 __ LoadIsolate(T1); 2152 __ LoadIsolate(T1);
2154 // V0: Current user tag. 2153 // V0: Current user tag.
2155 __ lw(V0, Address(T1, Isolate::current_tag_offset())); 2154 __ lw(V0, Address(T1, Isolate::current_tag_offset()));
(...skipping 19 matching lines...) Expand all
2175 2174
2176 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { 2175 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
2177 __ LoadIsolate(V0); 2176 __ LoadIsolate(V0);
2178 __ Ret(); 2177 __ Ret();
2179 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); 2178 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset()));
2180 } 2179 }
2181 2180
2182 } // namespace dart 2181 } // namespace dart
2183 2182
2184 #endif // defined TARGET_ARCH_MIPS 2183 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698