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

AArch64: Add StoreStore membar explicitly for Volatile Writes in TemplateTable

XMLWordPrintable

    • b14
    • aarch64
    • generic

        The original discussion can be found here:
        https://mail.openjdk.java.net/pipermail/aarch64-port-dev/2019-February/006875.html

        It has been known that Volatile Store needs a StoreLoad|StoreStore barrier at the end of the templateTable_aarch64 functions like fast_storefield, putfield_or_static. In Arm reference manual, according to the description of DMB instruction, the option ISH (Any-Any) for StoreLoad barrier option covers ISHST for StoreStore, so StoreLoad was/is sufficient from the view point of functionality.

        In order to make the code self-documented and would not confuse people in future, a suggestion here is to add back the intentionally missed "|StoreStore".

        This change will not bring practical impacts to functions since generated instructions are same.

        The positive part of this is: making things clarified and aligned, for example, the logic in interpreter here will be more clearly aligned with the logic in C2 implementation for a volatile write:
        dmb ish
        str<x>
        dmb ish

              qpzhang Patrick Zhang
              qpzhang Patrick Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: