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

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

Issue 120723003: Refactors CPU feature detection. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Cleanup Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
(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_X64_H_
6 #define VM_CPU_X64_H_
7
8 #include "vm/allocation.h"
9
10 namespace dart {
11
12 class CPUFeatures : public AllStatic {
13 public:
14 static void InitOnce();
15 static bool sse2_supported() { return true; }
16 static bool sse4_1_supported();
17 static bool double_truncate_round_supported() { return false; }
18 static char* hardware();
19
20 private:
21 static const uint64_t kSSE4_1BitMask = static_cast<uint64_t>(1) << 51;
22
23 static bool sse2_supported_;
24 static bool sse4_1_supported_;
25
26 #define HARDWARE_LEN 64
27 static char hardware_[HARDWARE_LEN];
28
29 #if defined(DEBUG)
30 static bool initialized_;
31 #endif
32 };
33
34 } // namespace dart
35
36 #endif // VM_CPU_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698