[RFR]: 8186461: zero: Don't use PowerPC FPU instructions on targets without FPU
John Paul Adrian Glaubitz
glaubitz at physik.fu-berlin.de
Fri Aug 18 19:47:16 UTC 2017
For 32-Bit PowerPC, zero contains a platform-specific implementation of
atomic_copy64() which uses inline-assembly with FPU instructions to
perform a 64-bit atomic copy.
Unfortunately, the inline assembly with the FPU instructions is
unconditionally enabled on all 32-Bit PowerPC machines which means that
the code in question will fail to build on 32-Bit PowerPC machines without
an FPU.
On such systems are for example the PowerPC e500 CPU, gcc will define
the macro __NO_FPRS__:
root at atlantis:~> echo | gcc -E -dM - |grep -i FPR
#define __NO_FPRS__ 1
root at atlantis:~>
Thus, in order to make sure zero builds on these systems without problems,
we should not just test whether PPC32 is defined but also that __NO_FPRS__
is not defined before enabling the inline assembly with FPU instructions.
Bug is described in [1] with an attached patch.
Adrian
> [1] https://bugs.openjdk.java.net/browse/JDK-8186461
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz at debian.org
`. `' Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
More information about the hotspot-dev
mailing list