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

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

Issue 2493553002: Fix -Wsign-compare warnings in parser, scanner, regexp, runtime. (Closed)
Patch Set: Created 4 years, 1 month 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/ast/ast.cc ('k') | src/builtins/builtins-regexp.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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 // Interpret extended CPU feature information. 409 // Interpret extended CPU feature information.
410 if (num_ext_ids > 0x80000000) { 410 if (num_ext_ids > 0x80000000) {
411 __cpuid(cpu_info, 0x80000001); 411 __cpuid(cpu_info, 0x80000001);
412 has_lzcnt_ = (cpu_info[2] & 0x00000020) != 0; 412 has_lzcnt_ = (cpu_info[2] & 0x00000020) != 0;
413 // SAHF must be probed in long mode. 413 // SAHF must be probed in long mode.
414 has_sahf_ = (cpu_info[2] & 0x00000001) != 0; 414 has_sahf_ = (cpu_info[2] & 0x00000001) != 0;
415 } 415 }
416 416
417 // Check if CPU has non stoppable time stamp counter. 417 // Check if CPU has non stoppable time stamp counter.
418 const int parameter_containing_non_stop_time_stamp_counter = 0x80000007; 418 const unsigned parameter_containing_non_stop_time_stamp_counter = 0x80000007;
419 if (num_ext_ids >= parameter_containing_non_stop_time_stamp_counter) { 419 if (num_ext_ids >= parameter_containing_non_stop_time_stamp_counter) {
420 __cpuid(cpu_info, parameter_containing_non_stop_time_stamp_counter); 420 __cpuid(cpu_info, parameter_containing_non_stop_time_stamp_counter);
421 has_non_stop_time_stamp_counter_ = (cpu_info[3] & (1 << 8)) != 0; 421 has_non_stop_time_stamp_counter_ = (cpu_info[3] & (1 << 8)) != 0;
422 } 422 }
423 423
424 #elif V8_HOST_ARCH_ARM 424 #elif V8_HOST_ARCH_ARM
425 425
426 #if V8_OS_LINUX 426 #if V8_OS_LINUX
427 427
428 CPUInfo cpu_info; 428 CPUInfo cpu_info;
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 part_ = PPC_POWER5; 702 part_ = PPC_POWER5;
703 break; 703 break;
704 } 704 }
705 #endif // V8_OS_AIX 705 #endif // V8_OS_AIX
706 #endif // !USE_SIMULATOR 706 #endif // !USE_SIMULATOR
707 #endif // V8_HOST_ARCH_PPC 707 #endif // V8_HOST_ARCH_PPC
708 } 708 }
709 709
710 } // namespace base 710 } // namespace base
711 } // namespace v8 711 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.cc ('k') | src/builtins/builtins-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698