OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "arm64/utils-arm64.h" | 7 #include "src/arm64/utils-arm64.h" |
8 | 8 |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
13 #define __ assm-> | 13 #define __ assm-> |
14 | 14 |
15 | 15 |
16 int CountLeadingZeros(uint64_t value, int width) { | 16 int CountLeadingZeros(uint64_t value, int width) { |
17 // TODO(jbramley): Optimize this for ARM64 hosts. | 17 // TODO(jbramley): Optimize this for ARM64 hosts. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 int MaskToBit(uint64_t mask) { | 81 int MaskToBit(uint64_t mask) { |
82 ASSERT(CountSetBits(mask, 64) == 1); | 82 ASSERT(CountSetBits(mask, 64) == 1); |
83 return CountTrailingZeros(mask, 64); | 83 return CountTrailingZeros(mask, 64); |
84 } | 84 } |
85 | 85 |
86 | 86 |
87 } } // namespace v8::internal | 87 } } // namespace v8::internal |
88 | 88 |
89 #endif // V8_TARGET_ARCH_ARM64 | 89 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |