OLD | NEW |
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" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2270 __ jr(T1); | 2270 __ jr(T1); |
2271 | 2271 |
2272 __ Bind(&miss); | 2272 __ Bind(&miss); |
2273 __ LoadIsolate(T2); | 2273 __ LoadIsolate(T2); |
2274 __ lw(CODE_REG, Address(T2, Isolate::ic_miss_code_offset())); | 2274 __ lw(CODE_REG, Address(T2, Isolate::ic_miss_code_offset())); |
2275 __ lw(T1, FieldAddress(CODE_REG, Code::entry_point_offset())); | 2275 __ lw(T1, FieldAddress(CODE_REG, Code::entry_point_offset())); |
2276 __ jr(T1); | 2276 __ jr(T1); |
2277 } | 2277 } |
2278 | 2278 |
2279 | 2279 |
2280 | |
2281 // Called from switchable IC calls. | 2280 // Called from switchable IC calls. |
2282 // T0: receiver | 2281 // T0: receiver |
| 2282 // S5: SingleTargetCache |
| 2283 void StubCode::GenerateUnlinkedCallStub(Assembler* assembler) { |
| 2284 __ NoMonomorphicCheckedEntry(); |
| 2285 |
| 2286 __ EnterStubFrame(); |
| 2287 __ Push(T0); // Preserve receiver. |
| 2288 |
| 2289 __ PushObject(Object::null_object()); // Result. |
| 2290 __ Push(T0); // Arg0: Receiver |
| 2291 __ Push(S5); // Arg1: UnlinkedCall |
| 2292 __ CallRuntime(kUnlinkedCallRuntimeEntry, 2); |
| 2293 __ Drop(2); |
| 2294 __ Pop(S5); // result = IC |
| 2295 |
| 2296 __ Pop(T0); // Restore receiver. |
| 2297 __ LeaveStubFrame(); |
| 2298 |
| 2299 __ lw(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset())); |
| 2300 __ lw(T1, FieldAddress(CODE_REG, Code::checked_entry_point_offset())); |
| 2301 __ jr(T1); |
| 2302 } |
| 2303 |
| 2304 |
| 2305 // Called from switchable IC calls. |
| 2306 // T0: receiver |
2283 // S5: SingleTargetCache | 2307 // S5: SingleTargetCache |
2284 // Passed to target: | 2308 // Passed to target: |
2285 // CODE_REG: target Code object | 2309 // CODE_REG: target Code object |
2286 void StubCode::GenerateSingleTargetCallStub(Assembler* assembler) { | 2310 void StubCode::GenerateSingleTargetCallStub(Assembler* assembler) { |
2287 __ NoMonomorphicCheckedEntry(); | 2311 __ NoMonomorphicCheckedEntry(); |
2288 | 2312 |
2289 Label miss; | 2313 Label miss; |
2290 | 2314 |
2291 __ LoadClassIdMayBeSmi(T1, T0); | 2315 __ LoadClassIdMayBeSmi(T1, T0); |
2292 __ lhu(T2, FieldAddress(S5, SingleTargetCache::lower_limit_offset())); | 2316 __ lhu(T2, FieldAddress(S5, SingleTargetCache::lower_limit_offset())); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2339 } | 2363 } |
2340 | 2364 |
2341 | 2365 |
2342 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { | 2366 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { |
2343 __ break_(0); | 2367 __ break_(0); |
2344 } | 2368 } |
2345 | 2369 |
2346 } // namespace dart | 2370 } // namespace dart |
2347 | 2371 |
2348 #endif // defined TARGET_ARCH_MIPS | 2372 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |