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

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

Issue 853703002: [x86] Avoid memory form of PUSH/CALL for ATOM. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 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
« no previous file with comments | « src/base/cpu.h ('k') | src/compiler/ia32/instruction-selector-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 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 #include "src/base/cpu.h" 5 #include "src/base/cpu.h"
6 6
7 #if V8_LIBC_MSVCRT 7 #if V8_LIBC_MSVCRT
8 #include <intrin.h> // __cpuid() 8 #include <intrin.h> // __cpuid()
9 #endif 9 #endif
10 #if V8_OS_LINUX 10 #if V8_OS_LINUX
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 has_fpu_(false), 308 has_fpu_(false),
309 has_cmov_(false), 309 has_cmov_(false),
310 has_sahf_(false), 310 has_sahf_(false),
311 has_mmx_(false), 311 has_mmx_(false),
312 has_sse_(false), 312 has_sse_(false),
313 has_sse2_(false), 313 has_sse2_(false),
314 has_sse3_(false), 314 has_sse3_(false),
315 has_ssse3_(false), 315 has_ssse3_(false),
316 has_sse41_(false), 316 has_sse41_(false),
317 has_sse42_(false), 317 has_sse42_(false),
318 is_atom_(false),
318 has_avx_(false), 319 has_avx_(false),
319 has_fma3_(false), 320 has_fma3_(false),
320 has_idiva_(false), 321 has_idiva_(false),
321 has_neon_(false), 322 has_neon_(false),
322 has_thumb2_(false), 323 has_thumb2_(false),
323 has_vfp_(false), 324 has_vfp_(false),
324 has_vfp3_(false), 325 has_vfp3_(false),
325 has_vfp3_d32_(false), 326 has_vfp3_d32_(false),
326 is_fp64_mode_(false) { 327 is_fp64_mode_(false) {
327 memcpy(vendor_, "Unknown", 8); 328 memcpy(vendor_, "Unknown", 8);
(...skipping 30 matching lines...) Expand all
358 has_cmov_ = (cpu_info[3] & 0x00008000) != 0; 359 has_cmov_ = (cpu_info[3] & 0x00008000) != 0;
359 has_mmx_ = (cpu_info[3] & 0x00800000) != 0; 360 has_mmx_ = (cpu_info[3] & 0x00800000) != 0;
360 has_sse_ = (cpu_info[3] & 0x02000000) != 0; 361 has_sse_ = (cpu_info[3] & 0x02000000) != 0;
361 has_sse2_ = (cpu_info[3] & 0x04000000) != 0; 362 has_sse2_ = (cpu_info[3] & 0x04000000) != 0;
362 has_sse3_ = (cpu_info[2] & 0x00000001) != 0; 363 has_sse3_ = (cpu_info[2] & 0x00000001) != 0;
363 has_ssse3_ = (cpu_info[2] & 0x00000200) != 0; 364 has_ssse3_ = (cpu_info[2] & 0x00000200) != 0;
364 has_sse41_ = (cpu_info[2] & 0x00080000) != 0; 365 has_sse41_ = (cpu_info[2] & 0x00080000) != 0;
365 has_sse42_ = (cpu_info[2] & 0x00100000) != 0; 366 has_sse42_ = (cpu_info[2] & 0x00100000) != 0;
366 has_avx_ = (cpu_info[2] & 0x10000000) != 0; 367 has_avx_ = (cpu_info[2] & 0x10000000) != 0;
367 if (has_avx_) has_fma3_ = (cpu_info[2] & 0x00001000) != 0; 368 if (has_avx_) has_fma3_ = (cpu_info[2] & 0x00001000) != 0;
369
370 if (family_ == 0x6) {
371 switch (model_) {
372 case 0x1c: // SLT
373 case 0x26:
374 case 0x36:
375 case 0x27:
376 case 0x35:
377 case 0x37: // SLM
378 case 0x4a:
379 case 0x4d:
380 is_atom_ = true;
381 }
382 }
368 } 383 }
369 384
370 #if V8_HOST_ARCH_IA32 385 #if V8_HOST_ARCH_IA32
371 // SAHF is always available in compat/legacy mode, 386 // SAHF is always available in compat/legacy mode,
372 has_sahf_ = true; 387 has_sahf_ = true;
373 #else 388 #else
374 // Query extended IDs. 389 // Query extended IDs.
375 __cpuid(cpu_info, 0x80000000); 390 __cpuid(cpu_info, 0x80000000);
376 unsigned num_ext_ids = cpu_info[0]; 391 unsigned num_ext_ids = cpu_info[0];
377 392
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 part_ = PPC_PA6T; 642 part_ = PPC_PA6T;
628 } 643 }
629 } 644 }
630 645
631 #endif // V8_OS_LINUX 646 #endif // V8_OS_LINUX
632 #endif // !USE_SIMULATOR 647 #endif // !USE_SIMULATOR
633 #endif // V8_HOST_ARCH_PPC 648 #endif // V8_HOST_ARCH_PPC
634 } 649 }
635 650
636 } } // namespace v8::base 651 } } // namespace v8::base
OLDNEW
« no previous file with comments | « src/base/cpu.h ('k') | src/compiler/ia32/instruction-selector-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698