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" // 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 13 matching lines...) Expand all Loading... |
24 // if the intrinsified method always executes a return. | 24 // if the intrinsified method always executes a return. |
25 // The FP register should not be modified, because it is used by the profiler. | 25 // The FP register should not be modified, because it is used by the profiler. |
26 // The PP and THR registers (see constants_mips.h) must be preserved. | 26 // The PP and THR registers (see constants_mips.h) must be preserved. |
27 | 27 |
28 #define __ assembler-> | 28 #define __ assembler-> |
29 | 29 |
30 | 30 |
31 intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; } | 31 intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; } |
32 | 32 |
33 | 33 |
| 34 void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) { |
| 35 assembler->Comment("IntrinsicCallPrologue"); |
| 36 assembler->mov(CALLEE_SAVED_TEMP, RA); |
| 37 } |
| 38 |
| 39 |
| 40 void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) { |
| 41 assembler->Comment("IntrinsicCallEpilogue"); |
| 42 assembler->mov(RA, CALLEE_SAVED_TEMP); |
| 43 } |
| 44 |
| 45 |
34 // Intrinsify only for Smi value and index. Non-smi values need a store buffer | 46 // Intrinsify only for Smi value and index. Non-smi values need a store buffer |
35 // update. Array length is always a Smi. | 47 // update. Array length is always a Smi. |
36 void Intrinsifier::ObjectArraySetIndexed(Assembler* assembler) { | 48 void Intrinsifier::ObjectArraySetIndexed(Assembler* assembler) { |
37 if (Isolate::Current()->type_checks()) { | 49 if (Isolate::Current()->type_checks()) { |
38 return; | 50 return; |
39 } | 51 } |
40 | 52 |
41 Label fall_through; | 53 Label fall_through; |
42 __ lw(T1, Address(SP, 1 * kWordSize)); // Index. | 54 __ lw(T1, Address(SP, 1 * kWordSize)); // Index. |
43 __ andi(CMPRES1, T1, Immediate(kSmiTagMask)); | 55 __ andi(CMPRES1, T1, Immediate(kSmiTagMask)); |
(...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2230 | 2242 |
2231 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2243 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
2232 __ LoadIsolate(V0); | 2244 __ LoadIsolate(V0); |
2233 __ Ret(); | 2245 __ Ret(); |
2234 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); | 2246 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); |
2235 } | 2247 } |
2236 | 2248 |
2237 } // namespace dart | 2249 } // namespace dart |
2238 | 2250 |
2239 #endif // defined TARGET_ARCH_MIPS | 2251 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |