OLD | NEW |
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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 case AT_DCACHEBSIZE: | 663 case AT_DCACHEBSIZE: |
664 dcache_line_size_ = entry.a_un.a_val; | 664 dcache_line_size_ = entry.a_un.a_val; |
665 break; | 665 break; |
666 } | 666 } |
667 } | 667 } |
668 fclose(fp); | 668 fclose(fp); |
669 } | 669 } |
670 | 670 |
671 part_ = -1; | 671 part_ = -1; |
672 if (auxv_cpu_type) { | 672 if (auxv_cpu_type) { |
673 if (strcmp(auxv_cpu_type, "power8") == 0) { | 673 if (strcmp(auxv_cpu_type, "power9") == 0) { |
| 674 part_ = PPC_POWER9; |
| 675 } else if (strcmp(auxv_cpu_type, "power8") == 0) { |
674 part_ = PPC_POWER8; | 676 part_ = PPC_POWER8; |
675 } else if (strcmp(auxv_cpu_type, "power7") == 0) { | 677 } else if (strcmp(auxv_cpu_type, "power7") == 0) { |
676 part_ = PPC_POWER7; | 678 part_ = PPC_POWER7; |
677 } else if (strcmp(auxv_cpu_type, "power6") == 0) { | 679 } else if (strcmp(auxv_cpu_type, "power6") == 0) { |
678 part_ = PPC_POWER6; | 680 part_ = PPC_POWER6; |
679 } else if (strcmp(auxv_cpu_type, "power5") == 0) { | 681 } else if (strcmp(auxv_cpu_type, "power5") == 0) { |
680 part_ = PPC_POWER5; | 682 part_ = PPC_POWER5; |
681 } else if (strcmp(auxv_cpu_type, "ppc970") == 0) { | 683 } else if (strcmp(auxv_cpu_type, "ppc970") == 0) { |
682 part_ = PPC_G5; | 684 part_ = PPC_G5; |
683 } else if (strcmp(auxv_cpu_type, "ppc7450") == 0) { | 685 } else if (strcmp(auxv_cpu_type, "ppc7450") == 0) { |
684 part_ = PPC_G4; | 686 part_ = PPC_G4; |
685 } else if (strcmp(auxv_cpu_type, "pa6t") == 0) { | 687 } else if (strcmp(auxv_cpu_type, "pa6t") == 0) { |
686 part_ = PPC_PA6T; | 688 part_ = PPC_PA6T; |
687 } | 689 } |
688 } | 690 } |
689 | 691 |
690 #elif V8_OS_AIX | 692 #elif V8_OS_AIX |
691 switch (_system_configuration.implementation) { | 693 switch (_system_configuration.implementation) { |
| 694 case POWER_9: |
| 695 part_ = PPC_POWER9; |
| 696 break; |
692 case POWER_8: | 697 case POWER_8: |
693 part_ = PPC_POWER8; | 698 part_ = PPC_POWER8; |
694 break; | 699 break; |
695 case POWER_7: | 700 case POWER_7: |
696 part_ = PPC_POWER7; | 701 part_ = PPC_POWER7; |
697 break; | 702 break; |
698 case POWER_6: | 703 case POWER_6: |
699 part_ = PPC_POWER6; | 704 part_ = PPC_POWER6; |
700 break; | 705 break; |
701 case POWER_5: | 706 case POWER_5: |
702 part_ = PPC_POWER5; | 707 part_ = PPC_POWER5; |
703 break; | 708 break; |
704 } | 709 } |
705 #endif // V8_OS_AIX | 710 #endif // V8_OS_AIX |
706 #endif // !USE_SIMULATOR | 711 #endif // !USE_SIMULATOR |
707 #endif // V8_HOST_ARCH_PPC | 712 #endif // V8_HOST_ARCH_PPC |
708 } | 713 } |
709 | 714 |
710 } // namespace base | 715 } // namespace base |
711 } // namespace v8 | 716 } // namespace v8 |
OLD | NEW |