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

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

Issue 866843003: Contribution of PowerPC port (continuation of 422063005) - AIX Common1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address second set of comments Created 5 years, 10 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
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
11 #include <linux/auxvec.h> // AT_HWCAP 11 #include <linux/auxvec.h> // AT_HWCAP
12 #endif 12 #endif
13 #if V8_GLIBC_PREREQ(2, 16) 13 #if V8_GLIBC_PREREQ(2, 16)
14 #include <sys/auxv.h> // getauxval() 14 #include <sys/auxv.h> // getauxval()
15 #endif 15 #endif
16 #if V8_OS_QNX 16 #if V8_OS_QNX
17 #include <sys/syspage.h> // cpuinfo 17 #include <sys/syspage.h> // cpuinfo
18 #endif 18 #endif
19 #if V8_OS_LINUX && V8_HOST_ARCH_PPC 19 #if V8_OS_LINUX && V8_HOST_ARCH_PPC
20 #include <elf.h> 20 #include <elf.h>
21 #endif 21 #endif
22 #if V8_OS_AIX
23 #include <sys/systemcfg.h> // _system_configuration
24 #ifndef POWER_8
25 #define POWER_8 0x10000
26 #endif
27 #endif
22 #if V8_OS_POSIX 28 #if V8_OS_POSIX
23 #include <unistd.h> // sysconf() 29 #include <unistd.h> // sysconf()
24 #endif 30 #endif
25 31
26 #include <ctype.h> 32 #include <ctype.h>
27 #include <limits.h> 33 #include <limits.h>
28 #include <stdio.h> 34 #include <stdio.h>
29 #include <stdlib.h> 35 #include <stdlib.h>
30 #include <string.h> 36 #include <string.h>
31 #include <algorithm> 37 #include <algorithm>
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 part_ = PPC_POWER5; 653 part_ = PPC_POWER5;
648 } else if (strcmp(auxv_cpu_type, "ppc970") == 0) { 654 } else if (strcmp(auxv_cpu_type, "ppc970") == 0) {
649 part_ = PPC_G5; 655 part_ = PPC_G5;
650 } else if (strcmp(auxv_cpu_type, "ppc7450") == 0) { 656 } else if (strcmp(auxv_cpu_type, "ppc7450") == 0) {
651 part_ = PPC_G4; 657 part_ = PPC_G4;
652 } else if (strcmp(auxv_cpu_type, "pa6t") == 0) { 658 } else if (strcmp(auxv_cpu_type, "pa6t") == 0) {
653 part_ = PPC_PA6T; 659 part_ = PPC_PA6T;
654 } 660 }
655 } 661 }
656 662
657 #endif // V8_OS_LINUX 663 #elif V8_OS_AIX
664 switch (_system_configuration.implementation) {
665 case POWER_8:
666 part_ = PPC_POWER8;
667 break;
668 case POWER_7:
669 part_ = PPC_POWER7;
670 break;
671 case POWER_6:
672 part_ = PPC_POWER6;
673 break;
674 case POWER_5:
675 part_ = PPC_POWER5;
676 break;
677 }
678 #endif // V8_OS_AIX
658 #endif // !USE_SIMULATOR 679 #endif // !USE_SIMULATOR
659 #endif // V8_HOST_ARCH_PPC 680 #endif // V8_HOST_ARCH_PPC
660 } 681 }
661 682
662 } } // namespace v8::base 683 } } // namespace v8::base
OLDNEW
« no previous file with comments | « src/base/atomicops.h ('k') | src/base/logging.h » ('j') | src/serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698