1- diff -r 5556e9c1e681 make/autoconf/flags-other.m4
2- --- a/make/autoconf/flags-other.m4 Fri Apr 06 08:58:22 2018 -0700
3- +++ b /make/autoconf/flags-other.m4 Sat Apr 07 18:54:39 2018 +0200
4- @@ -120,6 +120,11 @@
5- [
1+ diff --git a/make/autoconf/flags-other.m4 b/ make/autoconf/flags-other.m4
2+ index e10e589..c72b939 100644
3+ --- a /make/autoconf/flags-other.m4
4+ +++ b/make/autoconf/flags-other.m4
5+ @@ -121,6 +121,16 @@ AC_DEFUN([FLAGS_SETUP_ASFLAGS_CPU_DEP],
66 # Misuse EXTRA_CFLAGS to mimic old behavior
77 $2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS ${$2EXTRA_CFLAGS}"
8- +
8+
99+ if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-ev3; then
1010+ $2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS -mcpu=arm926ej-s"
11+ + elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-rpi1; then
12+ + $2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS -mcpu=arm1176jzf-s"
13+ + elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-rpi2; then
14+ + $2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS -mcpu=cortex-a7"
15+ + elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-rpi3; then
16+ + $2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS -mcpu=cortex-a53"
1117+ fi
1218+
13-
1419 AC_SUBST($2JVM_ASFLAGS)
1520 ])
16- diff -r 5556e9c1e681 make/autoconf/flags.m4
17- --- a/make/autoconf/flags.m4 Fri Apr 06 08:58:22 2018 -0700
18- +++ b/make/autoconf/flags.m4 Sat Apr 07 18:54:39 2018 +0200
19- @@ -34,7 +34,7 @@
21+
22+ diff --git a/make/autoconf/flags.m4 b/make/autoconf/flags.m4
23+ index 472e7a6..45445f2 100644
24+ --- a/make/autoconf/flags.m4
25+ +++ b/make/autoconf/flags.m4
26+ @@ -34,7 +34,7 @@ m4_include([flags-other.m4])
2027 AC_DEFUN([FLAGS_SETUP_ABI_PROFILE],
2128 [
2229 AC_ARG_WITH(abi-profile, [AS_HELP_STRING([--with-abi-profile],
2330- [specify ABI profile for ARM builds (arm-vfp-sflt,arm-vfp-hflt,arm-sflt, armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64) @<:@toolchain dependent@:>@ ])])
24- + [specify ABI profile for ARM builds (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,arm-ev3,armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64) @<:@toolchain dependent@:>@ ])])
31+ + [specify ABI profile for ARM builds (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,arm-ev3,arm-rpi1,arm-rpi2,arm-rpi3, armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64) @<:@toolchain dependent@:>@ ])])
2532
2633 if test "x$with_abi_profile" != x; then
2734 if test "x$OPENJDK_TARGET_CPU" != xarm && \
28- @@ -55,6 +55,9 @@
35+ @@ -55,6 +55,18 @@ AC_DEFUN([FLAGS_SETUP_ABI_PROFILE],
2936 elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
3037 ARM_FLOAT_TYPE=sflt
3138 ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
3239+ elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-ev3; then
3340+ ARM_FLOAT_TYPE=sflt
3441+ ARM_ARCH_TYPE_FLAGS='-mcpu=arm926ej-s -marm'
42+ + elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-rpi1; then
43+ + ARM_FLOAT_TYPE=vfp-hflt
44+ + ARM_ARCH_TYPE_FLAGS='-mcpu=arm1176jzf-s -marm'
45+ + elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-rpi2; then
46+ + ARM_FLOAT_TYPE=vfp-hflt
47+ + ARM_ARCH_TYPE_FLAGS='-mcpu=cortex-a7 -marm'
48+ + elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-rpi3; then
49+ + ARM_FLOAT_TYPE=vfp-hflt
50+ + ARM_ARCH_TYPE_FLAGS='-mcpu=cortex-a53 -marm'
3551 elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
3652 ARM_FLOAT_TYPE=vfp-sflt
3753 ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
38- diff -r 5556e9c1e681 src/hotspot/cpu/arm/assembler_arm_32.hpp
39- --- a/src/hotspot/cpu/arm/assembler_arm_32.hpp Fri Apr 06 08:58:22 2018 -0700
40- +++ b/src/hotspot/cpu/arm/assembler_arm_32.hpp Sat Apr 07 18:54:39 2018 +0200
41- @@ -498,7 +498,7 @@
54+ diff --git a/make/autoconf/lib-softfloat.m4 b/make/autoconf/lib-softfloat.m4
55+ new file mode 100644
56+ index 0000000..7fa1ed1
57+ --- /dev/null
58+ +++ b/make/autoconf/lib-softfloat.m4
59+ @@ -0,0 +1,57 @@
60+ + #
61+ + # Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
62+ + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
63+ + #
64+ + # This code is free software; you can redistribute it and/or modify it
65+ + # under the terms of the GNU General Public License version 2 only, as
66+ + # published by the Free Software Foundation. Oracle designates this
67+ + # particular file as subject to the "Classpath" exception as provided
68+ + # by Oracle in the LICENSE file that accompanied this code.
69+ + #
70+ + # This code is distributed in the hope that it will be useful, but WITHOUT
71+ + # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
72+ + # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
73+ + # version 2 for more details (a copy is included in the LICENSE file that
74+ + # accompanied this code).
75+ + #
76+ + # You should have received a copy of the GNU General Public License version
77+ + # 2 along with this work; if not, write to the Free Software Foundation,
78+ + # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
79+ + #
80+ + # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
81+ + # or visit www.oracle.com if you need additional information or have any
82+ + # questions.
83+ + #
84+ +
85+ + ################################################################################
86+ + # Setup softfloat helper
87+ + ################################################################################
88+ + AC_DEFUN_ONCE([LIB_SETUP_SOFTFLOAT],
89+ + [
90+ + AC_ARG_WITH(softfloat, [AS_HELP_STRING([--with-softfloat],
91+ + [specify path to patched softfloat.a])])
92+ +
93+ + if test "x$NEEDS_LIB_SOFTFLOAT" = xfalse; then
94+ + if (test "x${with_softfloat}" != x && test "x${with_softfloat}" != xno); then
95+ + AC_MSG_WARN([[softfloat not used, so --with-softfloat is ignored]])
96+ + fi
97+ + SOFTFLOAT_LIBS=
98+ + else
99+ + SOFTFLOAT_FOUND=no
100+ +
101+ + if test "x${with_softfloat}" = xno; then
102+ + AC_MSG_ERROR([It is not possible to disable the use of softfloat. Remove the --without-softfloat option.])
103+ + fi
104+ +
105+ + if test "x${with_softfloat}" != x; then
106+ + SOFTFLOAT_LIBS="${with_softfloat}"
107+ + SOFTFLOAT_FOUND=yes
108+ + fi
109+ + if test "x$SOFTFLOAT_FOUND" = xno; then
110+ + HELP_MSG_MISSING_DEPENDENCY([softfloat])
111+ + AC_MSG_ERROR([Could not find softfloat! $HELP_MSG])
112+ + fi
113+ + fi
114+ +
115+ + AC_SUBST(SOFTFLOAT_LIBS)
116+ + ])
117+ diff --git a/make/autoconf/libraries.m4 b/make/autoconf/libraries.m4
118+ index 5bf8569..eec4be6 100644
119+ --- a/make/autoconf/libraries.m4
120+ +++ b/make/autoconf/libraries.m4
121+ @@ -32,6 +32,7 @@ m4_include([lib-freetype.m4])
122+ m4_include([lib-std.m4])
123+ m4_include([lib-x11.m4])
124+ m4_include([lib-fontconfig.m4])
125+ + m4_include([lib-softfloat.m4])
126+
127+ ################################################################################
128+ # Determine which libraries are needed for this configuration
129+ @@ -78,6 +79,13 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
130+ NEEDS_LIB_ALSA=false
131+ fi
132+
133+ + if (test "x$OPENJDK_TARGET_CPU" == xarm &&
134+ + test "x$ARM_FLOAT_TYPE" = xsflt); then
135+ + NEEDS_LIB_SOFTFLOAT=true
136+ + else
137+ + NEEDS_LIB_SOFTFLOAT=false
138+ + fi
139+ +
140+ # Check if ffi is needed
141+ if HOTSPOT_CHECK_JVM_VARIANT(zero); then
142+ NEEDS_LIB_FFI=true
143+ @@ -97,6 +105,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
144+ LIB_SETUP_FONTCONFIG
145+ LIB_SETUP_FREETYPE
146+ LIB_SETUP_ALSA
147+ + LIB_SETUP_SOFTFLOAT
148+ LIB_SETUP_LIBFFI
149+ LIB_SETUP_BUNDLED_LIBS
150+ LIB_SETUP_MISC_LIBS
151+ diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in
152+ index ec45949..f3b222e 100644
153+ --- a/make/autoconf/spec.gmk.in
154+ +++ b/make/autoconf/spec.gmk.in
155+ @@ -343,6 +343,7 @@ FONTCONFIG_CFLAGS:=@FONTCONFIG_CFLAGS@
156+ CUPS_CFLAGS:=@CUPS_CFLAGS@
157+ ALSA_LIBS:=@ALSA_LIBS@
158+ ALSA_CFLAGS:=@ALSA_CFLAGS@
159+ + SOFTFLOAT_LIBS:=@SOFTFLOAT_LIBS@
160+ LIBFFI_LIBS:=@LIBFFI_LIBS@
161+ LIBFFI_CFLAGS:=@LIBFFI_CFLAGS@
162+ ENABLE_LIBFFI_BUNDLING:=@ENABLE_LIBFFI_BUNDLING@
163+ diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk
164+ index a4b67f0..15f8ae6 100644
165+ --- a/make/hotspot/lib/CompileJvm.gmk
166+ +++ b/make/hotspot/lib/CompileJvm.gmk
167+ @@ -49,6 +49,7 @@ JVM_LDFLAGS += \
168+
169+ JVM_LIBS += \
170+ $(JVM_LIBS_FEATURES) \
171+ + $(SOFTFLOAT_LIBS) \
172+ #
173+
174+ # These files and directories are always excluded
175+ diff --git a/src/hotspot/cpu/arm/assembler_arm_32.hpp b/src/hotspot/cpu/arm/assembler_arm_32.hpp
176+ index 53d6d17..c949c63 100644
177+ --- a/src/hotspot/cpu/arm/assembler_arm_32.hpp
178+ +++ b/src/hotspot/cpu/arm/assembler_arm_32.hpp
179+ @@ -498,7 +498,7 @@ class Assembler : public AbstractAssembler {
42180 void dmb(DMB_Opt opt, Register reg) {
43181 if (VM_Version::arm_arch() >= 7) {
44182 emit_int32(0xF57FF050 | opt);
@@ -47,32 +185,25 @@ diff -r 5556e9c1e681 src/hotspot/cpu/arm/assembler_arm_32.hpp
47185 bool preserve_tmp = (reg == noreg);
48186 if(preserve_tmp) {
49187 reg = Rtemp;
50- @@ -1239,10 +1239,17 @@
188+ @@ -1239,10 +1239,11 @@ extern int __aeabi_dcmpgt(double, double);
51189
52190 // Imported code from glibc soft-fp bundle for
53191 // calculation accuracy improvement. See CR 6757269.
54192- extern double __aeabi_fadd_glibc(float, float);
55193- extern double __aeabi_fsub_glibc(float, float);
56- - extern double __aeabi_dadd_glibc(double, double);
57- - extern double __aeabi_dsub_glibc(double, double);
58- +
59- + //extern double __aeabi_fadd_glibc(float, float);
60- + //extern double __aeabi_fsub_glibc(float, float);
61- + //extern double __aeabi_dadd_glibc(double, double);
62- + //extern double __aeabi_dsub_glibc(double, double);
194+ + extern float __aeabi_fadd_glibc(float, float);
195+ + extern float __aeabi_fsub_glibc(float, float);
196+ extern double __aeabi_dadd_glibc(double, double);
197+ extern double __aeabi_dsub_glibc(double, double);
63198+
64- + // We don't need very accurate floating point math.
65- + #define __aeabi_fadd_glibc __aeabi_fadd
66- + #define __aeabi_fsub_glibc __aeabi_fsub
67- + #define __aeabi_dadd_glibc __aeabi_dadd
68- + #define __aeabi_dsub_glibc __aeabi_dsub
69199 };
70200 #endif // __SOFTFP__
71201
72- diff -r 5556e9c1e681 src/hotspot/cpu/arm/vm_version_arm_32.cpp
73- --- a/src/hotspot/cpu/arm/vm_version_arm_32.cpp Fri Apr 06 08:58:22 2018 -0700
74- +++ b/src/hotspot/cpu/arm/vm_version_arm_32.cpp Sat Apr 07 18:54:39 2018 +0200
75- @@ -298,6 +298,15 @@
202+ diff --git a/src/hotspot/cpu/arm/vm_version_arm_32.cpp b/src/hotspot/cpu/arm/vm_version_arm_32.cpp
203+ index df0fb2e..f15dabd 100644
204+ --- a/src/hotspot/cpu/arm/vm_version_arm_32.cpp
205+ +++ b/src/hotspot/cpu/arm/vm_version_arm_32.cpp
206+ @@ -303,6 +303,15 @@ void VM_Version::initialize() {
76207 FLAG_SET_DEFAULT(UseUnalignedAccesses, false);
77208 }
78209
@@ -88,10 +219,11 @@ diff -r 5556e9c1e681 src/hotspot/cpu/arm/vm_version_arm_32.cpp
88219 _is_initialized = true;
89220 }
90221
91- diff -r 5556e9c1e681 src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.inline.hpp
92- --- a/src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.inline.hpp Fri Apr 06 08:58:22 2018 -0700
93- +++ b/src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.inline.hpp Sat Apr 07 18:54:39 2018 +0200
94- @@ -71,7 +71,7 @@
222+ diff --git a/src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.hpp b/src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.hpp
223+ index 9e6bda2..01a4ade 100644
224+ --- a/src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.hpp
225+ +++ b/src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.hpp
226+ @@ -72,7 +72,7 @@ inline static void dmb_sy() {
95227 __asm__ volatile (
96228 ".word 0xF57FF050 | 0xf" : : : "memory");
97229 #endif
@@ -100,7 +232,7 @@ diff -r 5556e9c1e681 src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.inline.h
100232 intptr_t zero = 0;
101233 __asm__ volatile (
102234 "mcr p15, 0, %0, c7, c10, 5"
103- @@ -95 ,7 +95 ,7 @@
235+ @@ -96 ,7 +96 ,7 @@ inline static void dmb_st() {
104236 __asm__ volatile (
105237 ".word 0xF57FF050 | 0xe" : : : "memory");
106238 #endif
@@ -109,15 +241,3 @@ diff -r 5556e9c1e681 src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.inline.h
109241 intptr_t zero = 0;
110242 __asm__ volatile (
111243 "mcr p15, 0, %0, c7, c10, 5"
112- diff -r 5556e9c1e681 src/hotspot/share/runtime/globals.hpp
113- --- a/src/hotspot/share/runtime/globals.hpp Fri Apr 06 08:58:22 2018 -0700
114- +++ b/src/hotspot/share/runtime/globals.hpp Sat Apr 07 18:54:39 2018 +0200
115- @@ -589,7 +589,7 @@
116- range(8, 256) \
117- constraint(ObjectAlignmentInBytesConstraintFunc,AtParse) \
118- \
119- - product(bool, AssumeMP, true, \
120- + product(bool, AssumeMP, false, \
121- "(Deprecated) Instruct the VM to assume multiple processors are available")\
122- \
123- /* UseMembar is theoretically a temp flag used for memory barrier */ \
0 commit comments