8214465: Upgrade arm-sflt minimum architecture to ARMv5TE for assembler
authordholmes
Thu, 29 Nov 2018 00:51:58 -0500
changeset 52736 99c48295ec8e
parent 52735 7b9f61b7fd94
child 52758 b2e14d91a50c
8214465: Upgrade arm-sflt minimum architecture to ARMv5TE for assembler Reviewed-by: erikj, dholmes Contributed-by: Jakub Vanek <linuxtardis@gmail.com>
make/autoconf/flags.m4
--- a/make/autoconf/flags.m4	Thu Nov 29 00:49:27 2018 -0500
+++ b/make/autoconf/flags.m4	Thu Nov 29 00:51:58 2018 -0500
@@ -46,6 +46,11 @@
     AC_MSG_CHECKING([for ABI profle])
     AC_MSG_RESULT([$OPENJDK_TARGET_ABI_PROFILE])
 
+    # --- Arm-sflt CFLAGS and ASFLAGS ---
+    # Armv5te is required for assembler, because pld insn used in arm32 hotspot is only in v5E and above.
+    # However, there is also a GCC bug which generates unaligned strd/ldrd instructions on armv5te:
+    # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82445, and it was fixed only quite recently.
+    # The resulting compromise is to enable v5TE for assembler and let GCC generate code for v5T.
     if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
       ARM_FLOAT_TYPE=vfp-sflt
       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
@@ -57,11 +62,11 @@
     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
       ARM_FLOAT_TYPE=sflt
       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
-      ARM_ARCH_TYPE_ASFLAGS='-march=armv5t'
+      ARM_ARCH_TYPE_ASFLAGS='-march=armv5te'
     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
       ARM_FLOAT_TYPE=vfp-sflt
       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
-      ARM_ARCH_TYPE_ASFLAGS='-march=armv5t'
+      ARM_ARCH_TYPE_ASFLAGS='-march=armv5te'
     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
       ARM_FLOAT_TYPE=vfp-hflt
       ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'