Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: runtime/vm/cpu_dbc.h

Issue 1928473003: DBC: Enable CpuInfo test (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/cpu_dbc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 VM_CPU_DBC_H_ 5 #ifndef VM_CPU_DBC_H_
6 #define VM_CPU_DBC_H_ 6 #define VM_CPU_DBC_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/simulator.h" 9 #include "vm/simulator.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 class HostCPUFeatures: public AllStatic { 13 class HostCPUFeatures: public AllStatic {
14 public: 14 public:
15 static const char* hardware() { return "simdbc"; } 15 static void InitOnce();
16 static void Cleanup();
17
18 static const char* hardware() {
19 DEBUG_ASSERT(initialized_);
20 return hardware_;
21 }
22
23 private:
24 static const char* hardware_;
25 #if defined(DEBUG)
26 static bool initialized_;
27 #endif
16 }; 28 };
17 29
18 class TargetCPUFeatures : public AllStatic { 30 class TargetCPUFeatures : public AllStatic {
19 public: 31 public:
20 static void InitOnce() {} 32 static void InitOnce() {
21 static void Cleanup() {} 33 HostCPUFeatures::InitOnce();
34 }
35 static void Cleanup() {
36 HostCPUFeatures::Cleanup();
37 }
38
39 static const char* hardware() {
40 return CPU::Id();
41 }
22 42
23 static bool double_truncate_round_supported() { 43 static bool double_truncate_round_supported() {
24 return true; 44 return true;
25 } 45 }
26 }; 46 };
27 47
28 } // namespace dart 48 } // namespace dart
29 49
30 #endif // VM_CPU_DBC_H_ 50 #endif // VM_CPU_DBC_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/cpu_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698