pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/openjdk11 openjdk11: assorted armv[67] build fixes
details: https://anonhg.NetBSD.org/pkgsrc/rev/4552bdf958a1
branches: trunk
changeset: 455160:4552bdf958a1
user: tnn <tnn%pkgsrc.org@localhost>
date: Mon Jun 28 22:53:05 2021 +0000
description:
openjdk11: assorted armv[67] build fixes
diffstat:
lang/openjdk11/distinfo | 7 +-
lang/openjdk11/patches/patch-src_hotspot_cpu_arm_c1__LIRAssembler__arm.cpp | 19 +
lang/openjdk11/patches/patch-src_hotspot_cpu_arm_c1__LIRGenerator__arm.cpp | 27 ++
lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__arm_bsd__arm__32.s | 126 ++++++++++
lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__arm_bytes__bsd__arm.inline.hpp | 22 +
lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__arm_vm__version__bsd__arm__32.cpp | 25 +
6 files changed, 225 insertions(+), 1 deletions(-)
diffs (263 lines):
diff -r 030a13b713d2 -r 4552bdf958a1 lang/openjdk11/distinfo
--- a/lang/openjdk11/distinfo Mon Jun 28 20:42:44 2021 +0000
+++ b/lang/openjdk11/distinfo Mon Jun 28 22:53:05 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.23 2021/06/27 08:53:54 tnn Exp $
+$NetBSD: distinfo,v 1.24 2021/06/28 22:53:05 tnn Exp $
SHA1 (bootstrap-jdk-1.11.0.5.8-netbsd-7-amd64-20190928.tar.xz) = d76599619b8bea879b8202b3efc38a82335d2e8c
RMD160 (bootstrap-jdk-1.11.0.5.8-netbsd-7-amd64-20190928.tar.xz) = a1b998e4e7edfb73ec35b0cc94895d9af16a8cd8
@@ -27,9 +27,14 @@
SHA1 (patch-make_lib_Awt2dLibraries.gmk) = ab77cfd0f07425b694688ffa98c2c661d1ac017d
SHA1 (patch-src_hotspot_cpu_aarch64_vm__version__aarch64.cpp) = 70cd073fcc3e84e673228754dd0fb85ce5ae7102
SHA1 (patch-src_hotspot_cpu_aarch64_vm__version__aarch64.hpp) = 042ae280b0988c945ed96a2c20e9f1cb356d8efe
+SHA1 (patch-src_hotspot_cpu_arm_c1__LIRAssembler__arm.cpp) = 97c6a06d6e957e267969cae3c9ad09c7ab9d0e56
+SHA1 (patch-src_hotspot_cpu_arm_c1__LIRGenerator__arm.cpp) = cfaace9741b0b30daf827119127478a195f8374f
SHA1 (patch-src_hotspot_os__cpu_bsd__aarch64_bytes__bsd__aarch64.inline.hpp) = 4153d3a12ffc24de868b2fd97498dbdf7645e499
SHA1 (patch-src_hotspot_os__cpu_bsd__aarch64_os__bsd__aarch64.cpp) = 190f56e8c725884712d850e096955d6d694e902d
SHA1 (patch-src_hotspot_os__cpu_bsd__aarch64_vm__version__bsd__aarch64.cpp) = abbfd0f9bd79e6363ffb050b48d081b7d1c3a8e1
+SHA1 (patch-src_hotspot_os__cpu_bsd__arm_bsd__arm__32.s) = 474a66abfb25030d4e32134816c14b157d1ebe6a
+SHA1 (patch-src_hotspot_os__cpu_bsd__arm_bytes__bsd__arm.inline.hpp) = a0e5c8b67efedf60e89354ba76d0ecfc0386a03e
+SHA1 (patch-src_hotspot_os__cpu_bsd__arm_vm__version__bsd__arm__32.cpp) = 8a99417711c4826490954d43f142afc0a0c68e9f
SHA1 (patch-src_hotspot_os_bsd_os__bsd.cpp) = 6322cbdda03dee528e89ac8b725f3df5e2165797
SHA1 (patch-src_hotspot_os_bsd_os__perf__bsd.cpp) = 7bb57f82f3a93adc1970ed4215148fc02ecbcd5a
SHA1 (patch-src_hotspot_os_posix_os__posix.cpp) = e70e8c1e59f0be184a7a1d6e9d11ac7b934ce4b2
diff -r 030a13b713d2 -r 4552bdf958a1 lang/openjdk11/patches/patch-src_hotspot_cpu_arm_c1__LIRAssembler__arm.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/openjdk11/patches/patch-src_hotspot_cpu_arm_c1__LIRAssembler__arm.cpp Mon Jun 28 22:53:05 2021 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_hotspot_cpu_arm_c1__LIRAssembler__arm.cpp,v 1.1 2021/06/28 22:53:05 tnn Exp $
+
+error: call of overloaded 'log2_intptr(int&)' is ambiguous
+note: candidate: int log2_intptr(uintptr_t)
+ inline int log2_intptr(uintptr_t x) {
+note: candidate: int log2_intptr(intptr_t)
+ inline int log2_intptr(intptr_t x) {
+
+--- src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp.orig 2021-04-24 02:47:22.000000000 +0000
++++ src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
+@@ -1062,7 +1062,7 @@ void LIR_Assembler::emit_op3(LIR_Op3* op
+ __ add_32(dest, left, AsmOperand(left, lsr, 31));
+ __ asr_32(dest, dest, 1);
+ } else if (c != (int) 0x80000000) {
+- int power = log2_intptr(c);
++ int power = log2_intptr((intptr_t)c);
+ __ asr_32(Rtemp, left, 31);
+ __ add_32(dest, left, AsmOperand(Rtemp, lsr, 32-power)); // dest = left + (left < 0 ? 2^power - 1 : 0);
+ __ asr_32(dest, dest, power); // dest = dest >>> power;
diff -r 030a13b713d2 -r 4552bdf958a1 lang/openjdk11/patches/patch-src_hotspot_cpu_arm_c1__LIRGenerator__arm.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/openjdk11/patches/patch-src_hotspot_cpu_arm_c1__LIRGenerator__arm.cpp Mon Jun 28 22:53:05 2021 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-src_hotspot_cpu_arm_c1__LIRGenerator__arm.cpp,v 1.1 2021/06/28 22:53:05 tnn Exp $
+
+error: call of overloaded 'log2_intptr(int)' is ambiguous
+ LIR_Address::Scale scale = (LIR_Address::Scale) log2_intptr(c + 1);
+note: candidate: int log2_intptr(uintptr_t)
+ inline int log2_intptr(uintptr_t x) {
+note: candidate: int log2_intptr(intptr_t)
+ inline int log2_intptr(intptr_t x) {
+
+--- src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp.orig 2021-04-24 02:47:22.000000000 +0000
++++ src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp
+@@ -443,13 +443,13 @@ bool LIRGenerator::strength_reduce_multi
+ __ shift_left(left, log2_intptr(c + 1), result);
+ __ sub(result, left, result);
+ #else
+- LIR_Address::Scale scale = (LIR_Address::Scale) log2_intptr(c + 1);
++ LIR_Address::Scale scale = (LIR_Address::Scale) log2_intptr((intptr_t)(c + 1));
+ LIR_Address* addr = new LIR_Address(left, left, scale, 0, T_INT);
+ __ sub(LIR_OprFact::address(addr), left, result); // rsb with shifted register
+ #endif // AARCH64
+ return true;
+ } else if (is_power_of_2(c - 1)) {
+- LIR_Address::Scale scale = (LIR_Address::Scale) log2_intptr(c - 1);
++ LIR_Address::Scale scale = (LIR_Address::Scale) log2_intptr((intptr_t)(c - 1));
+ LIR_Address* addr = new LIR_Address(left, left, scale, 0, T_INT);
+ __ add(left, LIR_OprFact::address(addr), result); // add with shifted register
+ return true;
diff -r 030a13b713d2 -r 4552bdf958a1 lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__arm_bsd__arm__32.s
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__arm_bsd__arm__32.s Mon Jun 28 22:53:05 2021 +0000
@@ -0,0 +1,126 @@
+$NetBSD: patch-src_hotspot_os__cpu_bsd__arm_bsd__arm__32.s,v 1.1 2021/06/28 22:53:05 tnn Exp $
+
+use gas(1) compatible mmnemonics
+
+--- src/hotspot/os_cpu/bsd_arm/bsd_arm_32.s.orig 2021-06-28 19:59:45.710900666 +0000
++++ src/hotspot/os_cpu/bsd_arm/bsd_arm_32.s
+@@ -94,7 +94,7 @@ dw_f2b_loop_32:
+ stmia to!, {r3 - r9, ip}
+ bgt dw_f2b_loop_32
+ dw_f2b_loop_32_finish:
+- addslt r2, #32
++ addlts r2, #32
+ beq disjoint_words_finish
+ cmp r2, #16
+ blt disjoint_words_small
+@@ -142,7 +142,7 @@ cw_f2b_loop_32:
+ stmia to!, {r3 - r9, ip}
+ bgt cw_f2b_loop_32
+ cw_f2b_loop_32_finish:
+- addslt r2, #32
++ addlts r2, #32
+ beq conjoint_words_finish
+ cmp r2, #16
+ blt conjoint_words_small
+@@ -175,7 +175,7 @@ cw_b2f_loop_32:
+ stmdb to!, {r3-r9,ip}
+ bgt cw_b2f_loop_32
+ cw_b2f_loop_32_finish:
+- addslt r2, #32
++ addlts r2, #32
+ beq conjoint_words_finish
+ cmp r2, #16
+ blt cw_b2f_copy_small
+@@ -227,7 +227,7 @@ cs_f2b_loop_32:
+ stmia to!, {r3 - r9, ip}
+ bgt cs_f2b_loop_32
+ cs_f2b_loop_32_finish:
+- addslt r2, #32
++ addlts r2, #32
+ beq conjoint_shorts_finish
+ movs r6, r2, lsr #3
+ .align 3
+@@ -243,11 +243,11 @@ cs_f2b_4:
+ beq conjoint_shorts_finish
+ cmp r2, #4
+ ldrh r3, [from], #2
+- ldrhge r4, [from], #2
+- ldrhgt r5, [from], #2
++ ldrgeh r4, [from], #2
++ ldrgth r5, [from], #2
+ strh r3, [to], #2
+- strhge r4, [to], #2
+- strhgt r5, [to], #2
++ strgeh r4, [to], #2
++ strgth r5, [to], #2
+ b conjoint_shorts_finish
+
+ # Destination not aligned
+@@ -305,11 +305,11 @@ cs_f2b_4_u:
+ beq conjoint_shorts_finish
+ cmp r2, #4
+ ldrh r3, [from], #2
+- ldrhge r4, [from], #2
+- ldrhgt r5, [from], #2
++ ldrgeh r4, [from], #2
++ ldrgth r5, [from], #2
+ strh r3, [to], #2
+- strhge r4, [to], #2
+- strhgt r5, [to], #2
++ strgeh r4, [to], #2
++ strgth r5, [to], #2
+ b conjoint_shorts_finish
+
+ # Src and dest overlap, copy in a descending order
+@@ -332,7 +332,7 @@ cs_b2f_loop_32:
+ stmdb to!, {r3-r9,ip}
+ bgt cs_b2f_loop_32
+ cs_b2f_loop_32_finish:
+- addslt r2, #32
++ addlts r2, #32
+ beq conjoint_shorts_finish
+ cmp r2, #24
+ blt cs_b2f_16
+@@ -358,11 +358,11 @@ cs_b2f_8:
+ cs_b2f_all_copy:
+ cmp r2, #4
+ ldrh r3, [from, #-2]!
+- ldrhge r4, [from, #-2]!
+- ldrhgt r5, [from, #-2]!
++ ldrgeh r4, [from, #-2]!
++ ldrgth r5, [from, #-2]!
+ strh r3, [to, #-2]!
+- strhge r4, [to, #-2]!
+- strhgt r5, [to, #-2]!
++ strgeh r4, [to, #-2]!
++ strgth r5, [to, #-2]!
+ b conjoint_shorts_finish
+
+ # Destination not aligned
+@@ -397,7 +397,7 @@ cs_b2f_16_loop_u:
+ bgt cs_b2f_16_loop_u
+ beq conjoint_shorts_finish
+ cs_b2f_16_loop_u_finished:
+- addslt r2, #16
++ addlts r2, #16
+ ldr r3, [from]
+ cmp r2, #10
+ blt cs_b2f_2_u_loop
+@@ -460,7 +460,7 @@ cl_f2b_loop_32:
+ stmia to!, {r3 - r9, ip}
+ bgt cl_f2b_loop_32
+ cl_f2b_loop_32_finish:
+- addslt r2, #32
++ addlts r2, #32
+ beq conjoint_longs_finish
+ conjoint_longs_small:
+ cmp r2, #16
+@@ -493,7 +493,7 @@ cl_b2f_loop_32:
+ stmdb to!, {r3 - r9, ip}
+ bgt cl_b2f_loop_32
+ cl_b2f_loop_32_finish:
+- addslt r2, #32
++ addlts r2, #32
+ beq conjoint_longs_finish
+ cmp r2, #16
+ blt cl_b2f_copy_8
diff -r 030a13b713d2 -r 4552bdf958a1 lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__arm_bytes__bsd__arm.inline.hpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__arm_bytes__bsd__arm.inline.hpp Mon Jun 28 22:53:05 2021 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_hotspot_os__cpu_bsd__arm_bytes__bsd__arm.inline.hpp,v 1.1 2021/06/28 22:53:05 tnn Exp $
+
+NetBSD/evbarm fixes
+
+--- src/hotspot/os_cpu/bsd_arm/bytes_bsd_arm.inline.hpp.orig 2021-04-24 02:47:22.000000000 +0000
++++ src/hotspot/os_cpu/bsd_arm/bytes_bsd_arm.inline.hpp
+@@ -25,9 +25,15 @@
+ #ifndef OS_CPU_BSD_ARM_VM_BYTES_BSD_ARM_INLINE_HPP
+ #define OS_CPU_BSD_ARM_VM_BYTES_BSD_ARM_INLINE_HPP
+
++#if defined(__NetBSD__)
++#define bswap_16(x) bswap16(x)
++#define bswap_32(x) bswap32(x)
++#define bswap_64(x) bswap64(x)
++#else
+ #define bswap_16(x) __bswap16(x)
+ #define bswap_32(x) __bswap32(x)
+ #define bswap_64(x) __bswap64(x)
++#endif
+
+ // Efficient swapping of data bytes from Java byte
+ // ordering to native byte ordering and vice versa.
diff -r 030a13b713d2 -r 4552bdf958a1 lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__arm_vm__version__bsd__arm__32.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__arm_vm__version__bsd__arm__32.cpp Mon Jun 28 22:53:05 2021 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_hotspot_os__cpu_bsd__arm_vm__version__bsd__arm__32.cpp,v 1.1 2021/06/28 22:53:05 tnn Exp $
+
+fix arch detection of NetBSD 32-bit ARM targets
+
+--- src/hotspot/os_cpu/bsd_arm/vm_version_bsd_arm_32.cpp.orig 2021-04-24 02:47:22.000000000 +0000
++++ src/hotspot/os_cpu/bsd_arm/vm_version_bsd_arm_32.cpp
+@@ -35,7 +35,7 @@ void VM_Version::get_os_cpu_info() {
+
+ int mib[2];
+ size_t len;
+- char machine[8]; // 8 chars max : "arm" + "v6|v7" + "|eb" + '\0'
++ char machine[11]; // 11 chars max : "earm" + "v6|v7" + "|hf" + "|eb" + '\0'
+
+ // Support for multiple calls in the init phase
+ if (done) return;
+@@ -55,6 +55,9 @@ void VM_Version::get_os_cpu_info() {
+ } else if (strncmp(machine, "armv", 4) == 0 &&
+ machine[4] >= '5' && machine[4] <= '9') {
+ _arm_arch = (int)(machine[4] - '0');
++ } else if (strncmp(machine, "earmv", 5) == 0 &&
++ machine[5] >= '5' && machine[5] <= '9') {
++ _arm_arch = (int)(machine[5] - '0');
+ }
+ }
+
Home |
Main Index |
Thread Index |
Old Index