OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
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_arm64.h) must be preserved. | 27 // The PP and THR registers (see constants_arm64.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) == 0); |
| 38 COMPILE_ASSERT((1 << CALLEE_SAVED_TEMP) & kAbiPreservedCpuRegs); |
| 39 COMPILE_ASSERT((1 << CALLEE_SAVED_TEMP2) & kAbiPreservedCpuRegs); |
| 40 COMPILE_ASSERT(CALLEE_SAVED_TEMP != CODE_REG); |
| 41 COMPILE_ASSERT(CALLEE_SAVED_TEMP != ARGS_DESC_REG); |
| 42 COMPILE_ASSERT(CALLEE_SAVED_TEMP2 != CODE_REG); |
| 43 COMPILE_ASSERT(CALLEE_SAVED_TEMP2 != ARGS_DESC_REG); |
| 44 |
36 assembler->Comment("IntrinsicCallPrologue"); | 45 assembler->Comment("IntrinsicCallPrologue"); |
37 assembler->mov(CALLEE_SAVED_TEMP, LR); | 46 assembler->mov(CALLEE_SAVED_TEMP, LR); |
38 assembler->mov(CALLEE_SAVED_TEMP2, R4); | 47 assembler->mov(CALLEE_SAVED_TEMP2, ARGS_DESC_REG); |
39 } | 48 } |
40 | 49 |
41 | 50 |
42 void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) { | 51 void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) { |
43 assembler->Comment("IntrinsicCallEpilogue"); | 52 assembler->Comment("IntrinsicCallEpilogue"); |
44 assembler->mov(LR, CALLEE_SAVED_TEMP); | 53 assembler->mov(LR, CALLEE_SAVED_TEMP); |
45 assembler->mov(R4, CALLEE_SAVED_TEMP2); | 54 assembler->mov(R4, CALLEE_SAVED_TEMP2); |
46 } | 55 } |
47 | 56 |
48 | 57 |
(...skipping 2144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2193 __ cmp(R0, Operand(0)); | 2202 __ cmp(R0, Operand(0)); |
2194 __ LoadObject(R0, Bool::False()); | 2203 __ LoadObject(R0, Bool::False()); |
2195 __ LoadObject(TMP, Bool::True()); | 2204 __ LoadObject(TMP, Bool::True()); |
2196 __ csel(R0, TMP, R0, NE); | 2205 __ csel(R0, TMP, R0, NE); |
2197 __ ret(); | 2206 __ ret(); |
2198 } | 2207 } |
2199 | 2208 |
2200 } // namespace dart | 2209 } // namespace dart |
2201 | 2210 |
2202 #endif // defined TARGET_ARCH_ARM64 | 2211 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |