[PATCH] Remove SoftFloat library dependency in arm-sflt builds

Jakub Vaněk linuxtardis at gmail.com
Sun Nov 25 15:52:44 UTC 2018


Hi,

this patch removes the workaround introduced to increase the floating
point precision on ARM softfloat builds.
More info about this can be found here: 
http://mail.openjdk.java.net/pipermail/aarch32-port-dev/2016-November/000610.html

Currently, without addressing the workaround, the arm-sflt build fails,
because these symbols are intended to be provided by an external
library.

I see two ways of handling this problem:
a) the workaround introduced to address the slightly lower precision is
dropped. The arm-sflt build then probably won't pass the TCK.
b) the workaround is extended. This includes creating a wrapper around
a modern SoftFloat version and integrating it into the build system. On
the other hand, this means we have to add the glue code and that the
softfloat library has to be built separately.

I'm not sure which way is better. I hope nobody is going to do perform
fp math on old ARM processors which would need the best precision.
Therefore I'm sending the easier solution - to drop the workaround. I'm
open to working on the other option, though.

Thanks,

Jakub

# HG changeset patch
# User Jakub Vaněk <linuxtardis at gmail.com>
# Date 1542067026 -3600
#      Tue Nov 13 00:57:06 2018 +0100
# Node ID 7863d8fe25d9d4e703d6650aedb223968c115e64
# Parent  a609d549992a4d094a514a6c0f5b79443192d8bf
Remove external softfloat library requirement for sflt builds

diff --git a/src/hotspot/cpu/arm/assembler_arm_32.hpp
b/src/hotspot/cpu/arm/assembler_arm_32.hpp
--- a/src/hotspot/cpu/arm/assembler_arm_32.hpp
+++ b/src/hotspot/cpu/arm/assembler_arm_32.hpp
@@ -1242,10 +1242,11 @@
 
 // Imported code from glibc soft-fp bundle for
 // calculation accuracy improvement. See CR 6757269.
-extern double __aeabi_fadd_glibc(float, float);
-extern double __aeabi_fsub_glibc(float, float);
-extern double __aeabi_dadd_glibc(double, double);
-extern double __aeabi_dsub_glibc(double, double);
+#define __aeabi_fadd_glibc __aeabi_fadd
+#define __aeabi_fsub_glibc __aeabi_fsub
+#define __aeabi_dadd_glibc __aeabi_dadd
+#define __aeabi_dsub_glibc __aeabi_dsub
+
 };
 #endif // __SOFTFP__
 





More information about the build-dev mailing list