OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
10 #include "src/serialize.h" | 10 #include "src/serialize.h" |
11 | 11 |
12 namespace v8 { | 12 namespace v8 { |
13 namespace internal { | 13 namespace internal { |
14 | 14 |
15 // ----------------------------------------------------------------------------- | 15 // ----------------------------------------------------------------------------- |
16 // Implementation of CpuFeatures | 16 // Implementation of CpuFeatures |
17 | 17 |
18 void CpuFeatures::ProbeImpl(bool cross_compile) { | 18 void CpuFeatures::ProbeImpl(bool cross_compile) { |
19 CPU cpu; | 19 CPU cpu; |
20 CHECK(cpu.has_sse2()); // SSE2 support is mandatory. | 20 CHECK(cpu.has_sse2()); // SSE2 support is mandatory. |
21 CHECK(cpu.has_cmov()); // CMOV support is mandatory. | 21 CHECK(cpu.has_cmov()); // CMOV support is mandatory. |
22 | 22 |
23 supported_ |= OS::CpuFeaturesImpliedByPlatform(); | |
24 | |
25 // Only use statically determined features for cross compile (snapshot). | 23 // Only use statically determined features for cross compile (snapshot). |
26 if (cross_compile) return; | 24 if (cross_compile) return; |
27 | 25 |
28 if (cpu.has_sse41() && FLAG_enable_sse4_1) supported_ |= 1u << SSE4_1; | 26 if (cpu.has_sse41() && FLAG_enable_sse4_1) supported_ |= 1u << SSE4_1; |
29 if (cpu.has_sse3() && FLAG_enable_sse3) supported_ |= 1u << SSE3; | 27 if (cpu.has_sse3() && FLAG_enable_sse3) supported_ |= 1u << SSE3; |
30 // SAHF is not generally available in long mode. | 28 // SAHF is not generally available in long mode. |
31 if (cpu.has_sahf() && FLAG_enable_sahf) supported_|= 1u << SAHF; | 29 if (cpu.has_sahf() && FLAG_enable_sahf) supported_|= 1u << SAHF; |
32 } | 30 } |
33 | 31 |
34 | 32 |
(...skipping 2935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2970 | 2968 |
2971 | 2969 |
2972 bool RelocInfo::IsInConstantPool() { | 2970 bool RelocInfo::IsInConstantPool() { |
2973 return false; | 2971 return false; |
2974 } | 2972 } |
2975 | 2973 |
2976 | 2974 |
2977 } } // namespace v8::internal | 2975 } } // namespace v8::internal |
2978 | 2976 |
2979 #endif // V8_TARGET_ARCH_X64 | 2977 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |