13 #ifndef V8_BASE_CPU_H_ 14 #define V8_BASE_CPU_H_ 16 #include "src/base/base-export.h" 17 #include "src/base/macros.h" 32 class V8_BASE_EXPORT
CPU final {
37 const char* vendor()
const {
return vendor_; }
38 int stepping()
const {
return stepping_; }
39 int model()
const {
return model_; }
40 int ext_model()
const {
return ext_model_; }
41 int family()
const {
return family_; }
42 int ext_family()
const {
return ext_family_; }
43 int type()
const {
return type_; }
46 int implementer()
const {
return implementer_; }
47 static const int ARM = 0x41;
48 static const int NVIDIA = 0x4e;
49 static const int QUALCOMM = 0x51;
50 int architecture()
const {
return architecture_; }
51 int variant()
const {
return variant_; }
52 static const int NVIDIA_DENVER = 0x0;
53 int part()
const {
return part_; }
56 static const int ARM_CORTEX_A5 = 0xc05;
57 static const int ARM_CORTEX_A7 = 0xc07;
58 static const int ARM_CORTEX_A8 = 0xc08;
59 static const int ARM_CORTEX_A9 = 0xc09;
60 static const int ARM_CORTEX_A12 = 0xc0c;
61 static const int ARM_CORTEX_A15 = 0xc0f;
64 static const int NVIDIA_DENVER_V10 = 0x002;
79 bool has_fpu()
const {
return has_fpu_; }
80 int icache_line_size()
const {
return icache_line_size_; }
81 int dcache_line_size()
const {
return dcache_line_size_; }
82 static const int UNKNOWN_CACHE_LINE_SIZE = 0;
85 bool has_cmov()
const {
return has_cmov_; }
86 bool has_sahf()
const {
return has_sahf_; }
87 bool has_mmx()
const {
return has_mmx_; }
88 bool has_sse()
const {
return has_sse_; }
89 bool has_sse2()
const {
return has_sse2_; }
90 bool has_sse3()
const {
return has_sse3_; }
91 bool has_ssse3()
const {
return has_ssse3_; }
92 bool has_sse41()
const {
return has_sse41_; }
93 bool has_sse42()
const {
return has_sse42_; }
94 bool has_osxsave()
const {
return has_osxsave_; }
95 bool has_avx()
const {
return has_avx_; }
96 bool has_fma3()
const {
return has_fma3_; }
97 bool has_bmi1()
const {
return has_bmi1_; }
98 bool has_bmi2()
const {
return has_bmi2_; }
99 bool has_lzcnt()
const {
return has_lzcnt_; }
100 bool has_popcnt()
const {
return has_popcnt_; }
101 bool is_atom()
const {
return is_atom_; }
102 bool has_non_stop_time_stamp_counter()
const {
103 return has_non_stop_time_stamp_counter_;
107 bool has_idiva()
const {
return has_idiva_; }
108 bool has_neon()
const {
return has_neon_; }
109 bool has_thumb2()
const {
return has_thumb2_; }
110 bool has_vfp()
const {
return has_vfp_; }
111 bool has_vfp3()
const {
return has_vfp3_; }
112 bool has_vfp3_d32()
const {
return has_vfp3_d32_; }
115 bool is_fp64_mode()
const {
return is_fp64_mode_; }
116 bool has_msa()
const {
return has_msa_; }
130 int icache_line_size_;
131 int dcache_line_size_;
157 bool has_non_stop_time_stamp_counter_;
164 #endif // V8_BASE_CPU_H_