Skip to content

Commit 9565a9a

Browse files
Milad FaV8 LUCI CQ
authored andcommitted
S390x: remove support for s390 32-bit, part 1
s390 has been out of support for a long time now. This CL removes the following from v8 codebase: - V8_TARGET_ARCH_S390 - V8_HOST_ARCH_S390 - V8_TARGET_ARCH_S390_LE_SIM - v8_current_cpu == "s390" - arch == s390 Change-Id: I97d4cafe0be65c91c872466b94dd835f695aaeab Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5857023 Commit-Queue: Milad Farazmand <[email protected]> Reviewed-by: Junliang Yan <[email protected]> Reviewed-by: Leszek Swirski <[email protected]> Reviewed-by: Jakob Kummerow <[email protected]> Cr-Commit-Position: refs/heads/main@{#96110}
1 parent e0ad8d5 commit 9565a9a

66 files changed

Lines changed: 126 additions & 175 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BUILD.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,7 @@ v8_config(
480480
],
481481
"@v8//bazel/config:v8_target_arm64": ["V8_TARGET_ARCH_ARM64"],
482482
"@v8//bazel/config:v8_target_s390x": [
483-
"V8_TARGET_ARCH_S390",
484-
"V8_TARGET_ARCH_S390X",
483+
"V8_TARGET_ARCH_S390X"
485484
],
486485
"@v8//bazel/config:v8_target_riscv64": [
487486
# NOTE: Bazel rules for riscv64 weren't tested on a real system.

BUILD.gn

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,14 +1416,11 @@ config("toolchain") {
14161416
defines += [ "V8_TARGET_ARCH_LOONG64" ]
14171417
}
14181418

1419-
if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
1420-
defines += [ "V8_TARGET_ARCH_S390" ]
1419+
if (v8_current_cpu == "s390x") {
14211420
cflags += [ "-ffp-contract=off" ]
1422-
if (v8_current_cpu == "s390x") {
1423-
defines += [ "V8_TARGET_ARCH_S390X" ]
1424-
}
1421+
defines += [ "V8_TARGET_ARCH_S390X" ]
14251422
if (host_byteorder == "little") {
1426-
defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ]
1423+
defines += [ "V8_TARGET_ARCH_S390X_LE_SIM" ]
14271424
} else if (current_os != "zos") {
14281425
cflags += [ "-march=z196" ]
14291426
}
@@ -3086,7 +3083,7 @@ v8_source_set("v8_initializers") {
30863083
### gcmole(ppc64) ###
30873084
"src/builtins/ppc/builtins-ppc.cc",
30883085
]
3089-
} else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
3086+
} else if (v8_current_cpu == "s390x") {
30903087
sources += [
30913088
### gcmole(s390) ###
30923089
"src/builtins/s390/builtins-s390.cc",
@@ -4781,7 +4778,7 @@ v8_header_set("v8_internal_headers") {
47814778
"src/baseline/ppc/baseline-compiler-ppc-inl.h",
47824779
]
47834780
}
4784-
} else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
4781+
} else if (v8_current_cpu == "s390x") {
47854782
sources += [
47864783
### gcmole(s390) ###
47874784
"src/codegen/s390/assembler-s390-inl.h",
@@ -5103,7 +5100,7 @@ if (v8_current_cpu == "x86") {
51035100
"src/compiler/backend/ppc/instruction-selector-ppc.cc",
51045101
"src/compiler/backend/ppc/unwinding-info-writer-ppc.cc",
51055102
]
5106-
} else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
5103+
} else if (v8_current_cpu == "s390x") {
51075104
v8_compiler_sources += [
51085105
### gcmole(s390) ###
51095106
"src/compiler/backend/s390/code-generator-s390.cc",
@@ -6139,7 +6136,7 @@ v8_source_set("v8_base_without_compiler") {
61396136
"src/execution/ppc/simulator-ppc.cc",
61406137
"src/regexp/ppc/regexp-macro-assembler-ppc.cc",
61416138
]
6142-
} else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
6139+
} else if (v8_current_cpu == "s390x") {
61436140
sources += [
61446141
### gcmole(s390) ###
61456142
"src/codegen/s390/assembler-s390.cc",
@@ -6315,8 +6312,7 @@ v8_source_set("v8_base_without_compiler") {
63156312
# to implement atomic memory access
63166313
if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" ||
63176314
v8_current_cpu == "ppc64" ||
6318-
(current_os != "zos" &&
6319-
(v8_current_cpu == "s390" || v8_current_cpu == "s390x")) ||
6315+
(current_os != "zos" && v8_current_cpu == "s390x") ||
63206316
v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") {
63216317
if (!is_clang) {
63226318
libs += [ "atomic" ]

include/v8-unwinder-state.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct CalleeSavedRegisters {
1919
};
2020
#elif V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM64 || \
2121
V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC64 || V8_TARGET_ARCH_RISCV64 || \
22-
V8_TARGET_ARCH_S390 || V8_TARGET_ARCH_LOONG64 || V8_TARGET_ARCH_RISCV32
22+
V8_TARGET_ARCH_S390X || V8_TARGET_ARCH_LOONG64 || V8_TARGET_ARCH_RISCV32
2323
struct CalleeSavedRegisters {};
2424
#else
2525
#error Target architecture was not detected as supported by v8

include/v8config.h

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -829,8 +829,8 @@ V8 shared library set USING_V8_SHARED.
829829
#elif defined(__PPC64__) || defined(_ARCH_PPC64)
830830
#define V8_HOST_ARCH_PPC64 1
831831
#define V8_HOST_ARCH_64_BIT 1
832-
#elif defined(__s390__) || defined(__s390x__)
833-
#define V8_HOST_ARCH_S390 1
832+
#elif defined(__s390x__)
833+
#define V8_HOST_ARCH_S390X 1
834834
#if defined(__s390x__)
835835
#define V8_HOST_ARCH_64_BIT 1
836836
#else
@@ -857,7 +857,7 @@ V8 shared library set USING_V8_SHARED.
857857
// compiler.
858858
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && \
859859
!V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS64 && \
860-
!V8_TARGET_ARCH_PPC64 && !V8_TARGET_ARCH_S390 && \
860+
!V8_TARGET_ARCH_PPC64 && !V8_TARGET_ARCH_S390X && \
861861
!V8_TARGET_ARCH_RISCV64 && !V8_TARGET_ARCH_LOONG64 && \
862862
!V8_TARGET_ARCH_RISCV32
863863
#if defined(_M_X64) || defined(__x86_64__)
@@ -874,11 +874,8 @@ V8 shared library set USING_V8_SHARED.
874874
#define V8_TARGET_ARCH_LOONG64 1
875875
#elif defined(_ARCH_PPC64)
876876
#define V8_TARGET_ARCH_PPC64 1
877-
#elif defined(__s390__)
878-
#define V8_TARGET_ARCH_S390 1
879-
#if defined(__s390x__)
877+
#elif defined(__s390x__)
880878
#define V8_TARGET_ARCH_S390X 1
881-
#endif
882879
#elif defined(__riscv) || defined(__riscv__)
883880
#if __riscv_xlen == 64
884881
#define V8_TARGET_ARCH_RISCV64 1
@@ -913,12 +910,8 @@ V8 shared library set USING_V8_SHARED.
913910
#define V8_TARGET_ARCH_64_BIT 1
914911
#elif V8_TARGET_ARCH_PPC64
915912
#define V8_TARGET_ARCH_64_BIT 1
916-
#elif V8_TARGET_ARCH_S390
917-
#if V8_TARGET_ARCH_S390X
913+
#elif V8_TARGET_ARCH_S390X
918914
#define V8_TARGET_ARCH_64_BIT 1
919-
#else
920-
#define V8_TARGET_ARCH_32_BIT 1
921-
#endif
922915
#elif V8_TARGET_ARCH_RISCV64
923916
#define V8_TARGET_ARCH_64_BIT 1
924917
#elif V8_TARGET_ARCH_RISCV32
@@ -981,8 +974,8 @@ V8 shared library set USING_V8_SHARED.
981974
#else
982975
#define V8_TARGET_LITTLE_ENDIAN 1
983976
#endif
984-
#elif V8_TARGET_ARCH_S390
985-
#if V8_TARGET_ARCH_S390_LE_SIM
977+
#elif V8_TARGET_ARCH_S390X
978+
#if V8_TARGET_ARCH_S390X_LE_SIM
986979
#define V8_TARGET_LITTLE_ENDIAN 1
987980
#else
988981
#define V8_TARGET_BIG_ENDIAN 1

src/base/immediate-crash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
#define TRAP_SEQUENCE1_() __builtin_trap()
9292
#define TRAP_SEQUENCE2_() asm volatile("")
9393

94-
#elif V8_HOST_ARCH_S390
94+
#elif V8_HOST_ARCH_S390X
9595

9696
// GDB software breakpoint instruction.
9797
// Same as `bkpt` under the assembler.

src/base/platform/platform-posix.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ int OS::ActivationFrameAlignment() {
278278
return 8;
279279
#elif V8_TARGET_ARCH_MIPS
280280
return 8;
281-
#elif V8_TARGET_ARCH_S390
281+
#elif V8_TARGET_ARCH_S390X
282282
return 8;
283283
#else
284284
// Otherwise we just assume 16 byte alignment, i.e.:
@@ -368,10 +368,6 @@ void* OS::GetRandomMmapAddr() {
368368
// of virtual addressing. Truncate to 40 bits to allow kernel chance to
369369
// fulfill request.
370370
raw_addr &= uint64_t{0xFFFFFFF000};
371-
#elif V8_TARGET_ARCH_S390
372-
// 31 bits of virtual addressing. Truncate to 29 bits to allow kernel chance
373-
// to fulfill request.
374-
raw_addr &= 0x1FFFF000;
375371
#elif V8_TARGET_ARCH_MIPS64
376372
// 42 bits of virtual addressing. Truncate to 40 bits to allow kernel chance
377373
// to fulfill request.
@@ -759,7 +755,7 @@ void OS::DebugBreak() {
759755
asm("int $3");
760756
#elif V8_OS_ZOS
761757
asm(" dc x'0001'");
762-
#elif V8_HOST_ARCH_S390
758+
#elif V8_HOST_ARCH_S390X
763759
// Software breakpoint instruction is 0x0001
764760
asm volatile(".word 0x0001");
765761
#elif V8_HOST_ARCH_RISCV64

src/base/platform/platform-starboard.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ int OS::ActivationFrameAlignment() {
100100
return 8;
101101
#elif V8_TARGET_ARCH_MIPS
102102
return 8;
103-
#elif V8_TARGET_ARCH_S390
103+
#elif V8_TARGET_ARCH_S390X
104104
return 8;
105105
#else
106106
// Otherwise we just assume 16 byte alignment, i.e.:

src/builtins/s390/builtins-s390.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
#if V8_TARGET_ARCH_S390
5+
#if V8_TARGET_ARCH_S390X
66

77
#include "src/api/api-arguments.h"
88
#include "src/builtins/builtins-inl.h"
@@ -4306,4 +4306,4 @@ void Builtins::Generate_RestartFrameTrampoline(MacroAssembler* masm) {
43064306
} // namespace internal
43074307
} // namespace v8
43084308

4309-
#endif // V8_TARGET_ARCH_S390
4309+
#endif // V8_TARGET_ARCH_S390X

src/codegen/assembler-arch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "src/codegen/mips64/assembler-mips64.h"
2222
#elif V8_TARGET_ARCH_LOONG64
2323
#include "src/codegen/loong64/assembler-loong64.h"
24-
#elif V8_TARGET_ARCH_S390
24+
#elif V8_TARGET_ARCH_S390X
2525
#include "src/codegen/s390/assembler-s390.h"
2626
#elif V8_TARGET_ARCH_RISCV32 || V8_TARGET_ARCH_RISCV64
2727
#include "src/codegen/riscv/assembler-riscv.h"

src/codegen/assembler-inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "src/codegen/mips64/assembler-mips64-inl.h"
2222
#elif V8_TARGET_ARCH_LOONG64
2323
#include "src/codegen/loong64/assembler-loong64-inl.h"
24-
#elif V8_TARGET_ARCH_S390
24+
#elif V8_TARGET_ARCH_S390X
2525
#include "src/codegen/s390/assembler-s390-inl.h"
2626
#elif V8_TARGET_ARCH_RISCV32 || V8_TARGET_ARCH_RISCV64
2727
#include "src/codegen/riscv/assembler-riscv-inl.h"

0 commit comments

Comments
 (0)