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

C1 atomic access handlers use incorrect decorators

XMLWordPrintable

    • gc
    • b12
    • generic
    • generic

        In src/hotspot/share/c1/c1_LIRGenerator.cpp, the three functions access_atomic_(cmpxchg|xchg|add)_at all "default" the decorators to include MO_SEQ_CST, like so:

        // Atomic operations are SEQ_CST by default
        decorators |= ((decorators & MO_DECORATOR_MASK) != 0) ? MO_SEQ_CST : 0;

        The test is backward here. This should be adding MO_SEQ_CSET if there are no MO decorator masks, and leaving the MO field alone if there are.

              kbarrett Kim Barrett
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: