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

AArch64: use MOVI instead of FMOV to zero FP register

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 17
    • 17
    • hotspot
    • b17
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: