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 15 matching lines...) Expand all Loading... | |
26 // The FP register should not be modified, because it is used by the profiler. | 26 // The FP register should not be modified, because it is used by the profiler. |
27 // The PP and THR registers (see constants_mips.h) must be preserved. | 27 // The PP and THR registers (see constants_mips.h) must be preserved. |
28 | 28 |
29 #define __ assembler-> | 29 #define __ assembler-> |
30 | 30 |
31 | 31 |
32 intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; } | 32 intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; } |
33 | 33 |
34 | 34 |
35 void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) { | 35 void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) { |
36 COMPILE_ASSERT((1 << CODE_REG) & kAbiPreservedCpuRegs); | |
37 COMPILE_ASSERT((1 << ARGS_DESC_REG) & kAbiPreservedCpuRegs); | |
38 COMPILE_ASSERT((1 << CALLEE_SAVED_TEMP) & kAbiPreservedCpuRegs); | |
39 COMPILE_ASSERT(CALLEE_SAVED_TEMP != CODE_REG); | |
40 COMPILE_ASSERT(CALLEE_SAVED_TEMP != ARGS_DESC_REG); | |
41 | |
36 assembler->Comment("IntrinsicCallPrologue"); | 42 assembler->Comment("IntrinsicCallPrologue"); |
37 assembler->mov(CALLEE_SAVED_TEMP, RA); | 43 assembler->mov(CALLEE_SAVED_TEMP, RA); |
Vyacheslav Egorov (Google)
2016/05/25 11:15:31
RA -> LRREG
rmacnak
2016/05/25 16:58:51
Done.
| |
38 } | 44 } |
39 | 45 |
40 | 46 |
41 void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) { | 47 void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) { |
42 assembler->Comment("IntrinsicCallEpilogue"); | 48 assembler->Comment("IntrinsicCallEpilogue"); |
43 assembler->mov(RA, CALLEE_SAVED_TEMP); | 49 assembler->mov(RA, CALLEE_SAVED_TEMP); |
44 } | 50 } |
45 | 51 |
46 | 52 |
47 // Intrinsify only for Smi value and index. Non-smi values need a store buffer | 53 // Intrinsify only for Smi value and index. Non-smi values need a store buffer |
(...skipping 2174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2222 __ lw(T0, Address(V0, TimelineStream::enabled_offset())); | 2228 __ lw(T0, Address(V0, TimelineStream::enabled_offset())); |
2223 __ LoadObject(V0, Bool::True()); | 2229 __ LoadObject(V0, Bool::True()); |
2224 __ LoadObject(V1, Bool::False()); | 2230 __ LoadObject(V1, Bool::False()); |
2225 __ Ret(); | 2231 __ Ret(); |
2226 __ delay_slot()->movz(V0, V1, T0); // V0 = (T0 == 0) ? V1 : V0. | 2232 __ delay_slot()->movz(V0, V1, T0); // V0 = (T0 == 0) ? V1 : V0. |
2227 } | 2233 } |
2228 | 2234 |
2229 } // namespace dart | 2235 } // namespace dart |
2230 | 2236 |
2231 #endif // defined TARGET_ARCH_MIPS | 2237 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |