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

AArch64: use MOVI instead of FMOV to zero FP register

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b17
    • CPU:
      aarch64

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: