Skip to content

Commit f31a611

Browse files
miladfarcarichardlau
authored andcommitted
deps: V8: cherry-pick 530080c44af2
Original commit message: ``` PPC: Add Power10 to the supported list and enable related features This CL adds Power10 recognition to Linux, AIX as well as IBMi. Enabled features include: MODULO FPR_GPR_MOV SIMD LWSYNC ISELECT VSX Change-Id: Ifc337e6497a3efe9697bcf03063a2b94471f96e9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2855041 Reviewed-by: Clemens Backes <[email protected]> Reviewed-by: Junliang Yan <[email protected]> Reviewed-by: Vasili Skurydzin <[email protected]> Commit-Queue: Milad Fa <[email protected]> Cr-Commit-Position: refs/heads/master@{#74279} ``` Refs: v8/v8@530080c PR-URL: #38489 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Ash Cripps <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent b51b4fe commit f31a611

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.11',
39+
'v8_embedder_string': '-node.12',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/base/cpu.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
#ifndef POWER_9
3232
#define POWER_9 0x20000
3333
#endif
34+
#ifndef POWER_10
35+
#define POWER_10 0x40000
36+
#endif
3437
#endif
3538
#if V8_OS_POSIX
3639
#include <unistd.h> // sysconf()
@@ -780,7 +783,10 @@ CPU::CPU()
780783

781784
part_ = -1;
782785
if (auxv_cpu_type) {
783-
if (strcmp(auxv_cpu_type, "power9") == 0) {
786+
if (strcmp(auxv_cpu_type, "power10") == 0) {
787+
part_ = PPC_POWER10;
788+
}
789+
else if (strcmp(auxv_cpu_type, "power9") == 0) {
784790
part_ = PPC_POWER9;
785791
} else if (strcmp(auxv_cpu_type, "power8") == 0) {
786792
part_ = PPC_POWER8;
@@ -801,6 +807,8 @@ CPU::CPU()
801807

802808
#elif V8_OS_AIX
803809
switch (_system_configuration.implementation) {
810+
case POWER_10:
811+
part_ = PPC_POWER10;
804812
case POWER_9:
805813
part_ = PPC_POWER9;
806814
break;

deps/v8/src/base/cpu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class V8_BASE_EXPORT CPU final {
7070
PPC_POWER7,
7171
PPC_POWER8,
7272
PPC_POWER9,
73+
PPC_POWER10,
7374
PPC_G4,
7475
PPC_G5,
7576
PPC_PA6T

deps/v8/src/codegen/ppc/assembler-ppc.cc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,28 @@ void CpuFeatures::ProbeImpl(bool cross_compile) {
6767
#ifndef USE_SIMULATOR
6868
// Probe for additional features at runtime.
6969
base::CPU cpu;
70-
if (cpu.part() == base::CPU::PPC_POWER9) {
70+
if (cpu.part() == base::CPU::PPC_POWER9 ||
71+
cpu.part() == base::CPU::PPC_POWER10) {
7172
supported_ |= (1u << MODULO);
7273
}
7374
#if V8_TARGET_ARCH_PPC64
7475
if (cpu.part() == base::CPU::PPC_POWER8 ||
75-
cpu.part() == base::CPU::PPC_POWER9) {
76+
cpu.part() == base::CPU::PPC_POWER9 ||
77+
cpu.part() == base::CPU::PPC_POWER10) {
7678
supported_ |= (1u << FPR_GPR_MOV);
7779
}
7880
#endif
7981
if (cpu.part() == base::CPU::PPC_POWER6 ||
8082
cpu.part() == base::CPU::PPC_POWER7 ||
8183
cpu.part() == base::CPU::PPC_POWER8 ||
82-
cpu.part() == base::CPU::PPC_POWER9) {
84+
cpu.part() == base::CPU::PPC_POWER9 ||
85+
cpu.part() == base::CPU::PPC_POWER10) {
8386
supported_ |= (1u << LWSYNC);
8487
}
8588
if (cpu.part() == base::CPU::PPC_POWER7 ||
8689
cpu.part() == base::CPU::PPC_POWER8 ||
87-
cpu.part() == base::CPU::PPC_POWER9) {
90+
cpu.part() == base::CPU::PPC_POWER9 ||
91+
cpu.part() == base::CPU::PPC_POWER10) {
8892
supported_ |= (1u << ISELECT);
8993
supported_ |= (1u << VSX);
9094
}

0 commit comments

Comments
 (0)