• Home
  • Raw
  • Download

Lines Matching refs:cpu_info

62 void __cpuid(int cpu_info[4], int info_type) {  in __cpuid()
67 : "=a"(cpu_info[0]), "=D"(cpu_info[1]), "=c"(cpu_info[2]), in __cpuid()
68 "=d"(cpu_info[3]) in __cpuid()
74 void __cpuid(int cpu_info[4], int info_type) {
76 : "=a"(cpu_info[0]), "=b"(cpu_info[1]), "=c"(cpu_info[2]),
77 "=d"(cpu_info[3])
132 int cpu_info[4] = {-1}; in Initialize() local
137 char cpu_string[sizeof(cpu_info) * 3 + 1]; in Initialize()
146 __cpuid(cpu_info, 0); in Initialize()
147 int num_ids = cpu_info[0]; in Initialize()
148 std::swap(cpu_info[2], cpu_info[3]); in Initialize()
149 static constexpr size_t kVendorNameSize = 3 * sizeof(cpu_info[1]); in Initialize()
152 memcpy(cpu_string, &cpu_info[1], kVendorNameSize); in Initialize()
159 __cpuid(cpu_info, 1); in Initialize()
163 signature_ = cpu_info[0]; in Initialize()
164 stepping_ = cpu_info[0] & 0xf; in Initialize()
165 model_ = ((cpu_info[0] >> 4) & 0xf) + ((cpu_info[0] >> 12) & 0xf0); in Initialize()
166 family_ = (cpu_info[0] >> 8) & 0xf; in Initialize()
167 type_ = (cpu_info[0] >> 12) & 0x3; in Initialize()
168 ext_model_ = (cpu_info[0] >> 16) & 0xf; in Initialize()
169 ext_family_ = (cpu_info[0] >> 20) & 0xff; in Initialize()
170 has_mmx_ = (cpu_info[3] & 0x00800000) != 0; in Initialize()
171 has_sse_ = (cpu_info[3] & 0x02000000) != 0; in Initialize()
172 has_sse2_ = (cpu_info[3] & 0x04000000) != 0; in Initialize()
173 has_sse3_ = (cpu_info[2] & 0x00000001) != 0; in Initialize()
174 has_ssse3_ = (cpu_info[2] & 0x00000200) != 0; in Initialize()
175 has_sse41_ = (cpu_info[2] & 0x00080000) != 0; in Initialize()
176 has_sse42_ = (cpu_info[2] & 0x00100000) != 0; in Initialize()
177 has_popcnt_ = (cpu_info[2] & 0x00800000) != 0; in Initialize()
190 (cpu_info[2] & 0x10000000) != 0 && in Initialize()
191 (cpu_info[2] & 0x04000000) != 0 /* XSAVE */ && in Initialize()
192 (cpu_info[2] & 0x08000000) != 0 /* OSXSAVE */ && in Initialize()
194 has_aesni_ = (cpu_info[2] & 0x02000000) != 0; in Initialize()
199 __cpuid(cpu_info, 0x80000000); in Initialize()
200 const int max_parameter = cpu_info[0]; in Initialize()
205 static_assert(kParameterSize * sizeof(cpu_info) + 1 == arraysize(cpu_string), in Initialize()
212 __cpuid(cpu_info, parameter); in Initialize()
213 memcpy(&cpu_string[i], cpu_info, sizeof(cpu_info)); in Initialize()
214 i += sizeof(cpu_info); in Initialize()
222 __cpuid(cpu_info, kParameterContainingNonStopTimeStampCounter); in Initialize()
223 has_non_stop_time_stamp_counter_ = (cpu_info[3] & (1 << 8)) != 0; in Initialize()