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

Side by Side Diff: src/base/cpu.h

Issue 2395553002: Reland "Turn libbase into a component" (Closed)
Patch Set: Created 4 years, 2 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 | « src/base/bits.h ('k') | src/base/debug/stack_trace.h » ('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 2006-2013 the V8 project authors. All rights reserved. 1 // Copyright 2006-2013 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 // This module contains the architecture-specific code. This make the rest of 5 // This module contains the architecture-specific code. This make the rest of
6 // the code less dependent on differences between different processor 6 // the code less dependent on differences between different processor
7 // architecture. 7 // architecture.
8 // The classes have the same definition for all architectures. The 8 // The classes have the same definition for all architectures. The
9 // implementation for a particular architecture is put in cpu_<arch>.cc. 9 // implementation for a particular architecture is put in cpu_<arch>.cc.
10 // The build system then uses the implementation for the target architecture. 10 // The build system then uses the implementation for the target architecture.
11 // 11 //
12 12
13 #ifndef V8_BASE_CPU_H_ 13 #ifndef V8_BASE_CPU_H_
14 #define V8_BASE_CPU_H_ 14 #define V8_BASE_CPU_H_
15 15
16 #include "src/base/base-export.h"
16 #include "src/base/macros.h" 17 #include "src/base/macros.h"
17 18
18 namespace v8 { 19 namespace v8 {
19 namespace base { 20 namespace base {
20 21
21 // ---------------------------------------------------------------------------- 22 // ----------------------------------------------------------------------------
22 // CPU 23 // CPU
23 // 24 //
24 // Query information about the processor. 25 // Query information about the processor.
25 // 26 //
26 // This class also has static methods for the architecture specific functions. 27 // This class also has static methods for the architecture specific functions.
27 // Add methods here to cope with differences between the supported 28 // Add methods here to cope with differences between the supported
28 // architectures. For each architecture the file cpu_<arch>.cc contains the 29 // architectures. For each architecture the file cpu_<arch>.cc contains the
29 // implementation of these static functions. 30 // implementation of these static functions.
30 31
31 class CPU final { 32 class V8_BASE_EXPORT CPU final {
32 public: 33 public:
33 CPU(); 34 CPU();
34 35
35 // x86 CPUID information 36 // x86 CPUID information
36 const char* vendor() const { return vendor_; } 37 const char* vendor() const { return vendor_; }
37 int stepping() const { return stepping_; } 38 int stepping() const { return stepping_; }
38 int model() const { return model_; } 39 int model() const { return model_; }
39 int ext_model() const { return ext_model_; } 40 int ext_model() const { return ext_model_; }
40 int family() const { return family_; } 41 int family() const { return family_; }
41 int ext_family() const { return ext_family_; } 42 int ext_family() const { return ext_family_; }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 bool has_vfp3_; 152 bool has_vfp3_;
152 bool has_vfp3_d32_; 153 bool has_vfp3_d32_;
153 bool is_fp64_mode_; 154 bool is_fp64_mode_;
154 bool has_non_stop_time_stamp_counter_; 155 bool has_non_stop_time_stamp_counter_;
155 }; 156 };
156 157
157 } // namespace base 158 } // namespace base
158 } // namespace v8 159 } // namespace v8
159 160
160 #endif // V8_BASE_CPU_H_ 161 #endif // V8_BASE_CPU_H_
OLDNEW
« no previous file with comments | « src/base/bits.h ('k') | src/base/debug/stack_trace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698