Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8264564

AArch64: use MOVI instead of FMOV to zero FP register

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 17
    • hotspot
    • b17
    • aarch64

      HotSpot generates an FMOV from ZR to zero a floating point register:

         fmov d0, xzr

      This used to be recommended by the Arm ARM, but that advice was removed in revision A.j and subsequent revisions (section C.5.3).

      Integer->FP moves may be slow on some cores. Instead the preferred instruction is MOVI with immediate zero:

         movi d0, #0x0

      Some micro-architectures special-case FMOV from ZR, and on those cores this change will have no effect, but in any case FMOV won't be faster than MOVI.

            ngasson Nick Gasson
            ngasson Nick Gasson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: