Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 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. | |
| 4 | |
| 5 #ifndef VM_CPU_IA32_H_ | |
| 6 #define VM_CPU_IA32_H_ | |
| 7 | |
| 8 #include "vm/allocation.h" | |
| 9 | |
| 10 namespace dart { | |
| 11 | |
| 12 class CPUFeatures : public AllStatic { | |
| 13 public: | |
| 14 static void InitOnce(); | |
| 15 // x64 always has at least SSE2. | |
| 16 static bool sse2_supported(); | |
| 17 static bool sse4_1_supported(); | |
| 18 static bool double_truncate_round_supported() { return sse4_1_supported(); } | |
| 19 static char* hardware(); | |
| 20 | |
| 21 private: | |
| 22 static const uint64_t kSSE2BitMask = static_cast<uint64_t>(1) << 26; | |
|
Cutch
2014/01/02 19:39:19
Should this be here or inside the .cc file?
| |
| 23 static const uint64_t kSSE4_1BitMask = static_cast<uint64_t>(1) << 51; | |
| 24 | |
| 25 static bool sse2_supported_; | |
| 26 static bool sse4_1_supported_; | |
| 27 | |
| 28 #define HARDWARE_LEN 64 | |
|
Cutch
2014/01/02 19:39:19
This #define and hardware_ is repeated in all file
| |
| 29 static char hardware_[HARDWARE_LEN]; | |
| 30 | |
| 31 #if defined(DEBUG) | |
| 32 static bool initialized_; | |
| 33 #endif | |
| 34 }; | |
| 35 | |
| 36 } // namespace dart | |
| 37 | |
| 38 #endif // VM_CPU_IA32_H_ | |
| OLD | NEW |