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

Remove redundant dmb after casal instruction

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Rejected
    • Icon: P4 P4
    • tbd
    • 22
    • hotspot
    • aarch64
    • linux

      In function `MacroAssembler::cmpxchgw` and `MacroAssembler::cmpxchgptr`, when turn on `UseLSE`, there is a `dmb`
       instruction generated after `casal` instruction.

      The `casal` means a CAS operate with both load-acquire and store-release semantics.

      It looks like the subsequent dmb is redundant.

      The code is bellow:
      ```
        if (UseLSE) {
          mov(tmp, oldv);
          casal(Assembler::xword, oldv, newv, addr);
          cmp(tmp, oldv);
          br(Assembler::EQ, succeed);
          membar(AnyAny);
        }
      ```

            jianyesun Jianye Sun
            jianyesun Jianye Sun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: