Advertisement
Guest User

Optimization patch

a guest
Nov 12th, 2018
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.55 KB | None | 0 0
  1. Hi,
  2.  
  3. This patch adds a new ARM ABI option for ARM926EJ-S. The reason is not
  4. because of ABI breakage, but it is because of GCC -mcpu flags
  5. specifically for this CPU. We think that this might increase
  6. performance a little bit. However, we do not have numbers for this.
  7. Alternatively, we may just stick to the arm-sflt ABI option.
  8.  
  9. This patch was successfully built with a few other independent patches
  10. here: https://ci.adoptopenjdk.net/view/ev3dev/ ;
  11. https://github.com/ev3dev-lang-java/openjdk-ev3
  12. We haven't run full jtreg tests on the target platform yet, but Juan
  13. Antonio Brena Moral invested his time into Adopt's openjdktests in
  14. QEMU. Also, the JVM seems to run fine on the ARM board itself.
  15.  
  16. Regards,
  17.  
  18. Jakub Vanek (with credit to Juan Antonio)
  19.  
  20. # HG changeset patch
  21. # User Jakub Vaněk <linuxtardis@gmail.com>
  22. # Date 1542060149 -3600
  23. #      Mon Nov 12 23:02:29 2018 +0100
  24. # Node ID 82c5c630ee8f9237b533ba6414143d109dec0180
  25. # Parent  a609d549992a4d094a514a6c0f5b79443192d8bf
  26. Add optimization flags for ARM926EJ-S
  27.  
  28. diff --git a/make/autoconf/flags-other.m4 b/make/autoconf/flags-other.m4
  29. --- a/make/autoconf/flags-other.m4
  30. +++ b/make/autoconf/flags-other.m4
  31. @@ -119,6 +119,10 @@
  32.    # Misuse EXTRA_CFLAGS to mimic old behavior
  33.    $2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS ${$2EXTRA_CFLAGS}"
  34.  
  35. +  if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm926ejs; then
  36. +    $2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS -mcpu=arm926ej-s"
  37. +  fi
  38. +
  39.    AC_SUBST($2JVM_ASFLAGS)
  40.  ])
  41.  
  42. diff --git a/make/autoconf/flags.m4 b/make/autoconf/flags.m4
  43. --- a/make/autoconf/flags.m4
  44. +++ b/make/autoconf/flags.m4
  45. @@ -34,7 +34,7 @@
  46.  AC_DEFUN([FLAGS_SETUP_ABI_PROFILE],
  47.  [
  48.    AC_ARG_WITH(abi-profile, [AS_HELP_STRING([--with-abi-profile],
  49. -      [specify ABI profile for ARM builds
  50. (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
  51. armv5-vfp-sflt,armv6-vfp-hflt,aarch64) @<:@toolchain dependent@:>@
  52. ])])
  53. +      [specify ABI profile for ARM builds
  54. (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
  55. arm926ejs,armv5-vfp-sflt,armv6-vfp-hflt,aarch64) @<:@toolchain
  56. dependent@:>@ ])])
  57.  
  58.    if test "x$with_abi_profile" != x; then
  59.      if test "x$OPENJDK_TARGET_CPU" != xarm && \
  60. @@ -55,6 +55,9 @@
  61.      elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
  62.        ARM_FLOAT_TYPE=sflt
  63.        ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
  64. +    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm926ejs; then
  65. +      ARM_FLOAT_TYPE=sflt
  66. +      ARM_ARCH_TYPE_FLAGS='-mcpu=arm926ej-s -marm'
  67.      elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
  68.        ARM_FLOAT_TYPE=vfp-sflt
  69.        ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement