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

AArch64: Use ZR for integer zero immediate volatile stores

XMLWordPrintable

    • b11
    • aarch64
    • generic

        In case non-volatile zero byte, char, int, long or pointer is stored C2 generates code like

        str xzr, [x21, #24]

        There are appropriate rules and encodings for that in aarch64.ad like
        storeimmB0() and aarch64_enc_strb0().

        For volatiles there are no such rules for 0 while all the rest is similar. Current code is like:

        mov x13, xzr
        stlr x13, [x11]

        One register can be saved and 1 instruction instead of 2 can be used:

        stlr xzr [x11]

              dchuyko Dmitry Chuyko
              dchuyko Dmitry Chuyko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: