| 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 #ifndef RUNTIME_VM_CPU_IA32_H_ | 5 #ifndef RUNTIME_VM_CPU_IA32_H_ |
| 6 #define RUNTIME_VM_CPU_IA32_H_ | 6 #define RUNTIME_VM_CPU_IA32_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 static const char* hardware_; | 35 static const char* hardware_; |
| 36 static bool sse2_supported_; | 36 static bool sse2_supported_; |
| 37 static bool sse4_1_supported_; | 37 static bool sse4_1_supported_; |
| 38 #if defined(DEBUG) | 38 #if defined(DEBUG) |
| 39 static bool initialized_; | 39 static bool initialized_; |
| 40 #endif | 40 #endif |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 class TargetCPUFeatures : public AllStatic { | 43 class TargetCPUFeatures : public AllStatic { |
| 44 public: | 44 public: |
| 45 static void InitOnce() { | 45 static void InitOnce() { HostCPUFeatures::InitOnce(); } |
| 46 HostCPUFeatures::InitOnce(); | 46 static void Cleanup() { HostCPUFeatures::Cleanup(); } |
| 47 } | 47 static const char* hardware() { return HostCPUFeatures::hardware(); } |
| 48 static void Cleanup() { | 48 static bool sse2_supported() { return HostCPUFeatures::sse2_supported(); } |
| 49 HostCPUFeatures::Cleanup(); | 49 static bool sse4_1_supported() { return HostCPUFeatures::sse4_1_supported(); } |
| 50 } | 50 static bool double_truncate_round_supported() { return sse4_1_supported(); } |
| 51 static const char* hardware() { | |
| 52 return HostCPUFeatures::hardware(); | |
| 53 } | |
| 54 static bool sse2_supported() { | |
| 55 return HostCPUFeatures::sse2_supported(); | |
| 56 } | |
| 57 static bool sse4_1_supported() { | |
| 58 return HostCPUFeatures::sse4_1_supported(); | |
| 59 } | |
| 60 static bool double_truncate_round_supported() { | |
| 61 return sse4_1_supported(); | |
| 62 } | |
| 63 }; | 51 }; |
| 64 | 52 |
| 65 } // namespace dart | 53 } // namespace dart |
| 66 | 54 |
| 67 #endif // RUNTIME_VM_CPU_IA32_H_ | 55 #endif // RUNTIME_VM_CPU_IA32_H_ |
| OLD | NEW |