src/hotspot/os_cpu/aix_ppc/atomic_aix_ppc.hpp
author mdoerr
Mon, 07 May 2018 12:28:11 +0200
changeset 50029 ea0a16ba6ac0
parent 47634 6a0c42c40cd1
child 53244 9807daeb47c4
permissions -rw-r--r--
8202080: Introduce ordering semantics for Atomic::add and other RMW atomics Reviewed-by: lucy, rehn, dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     1
/*
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
     2
 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
     3
 * Copyright (c) 2012, 2018 SAP SE. All rights reserved.
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     5
 *
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     8
 * published by the Free Software Foundation.
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
     9
 *
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    14
 * accompanied this code).
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    15
 *
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    19
 *
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    22
 * questions.
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    23
 *
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    24
 */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    25
40655
9f644073d3a0 8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents: 39404
diff changeset
    26
#ifndef OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_HPP
9f644073d3a0 8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents: 39404
diff changeset
    27
#define OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_HPP
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    28
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    29
#ifndef PPC64
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    30
#error "Atomic currently only implemented for PPC64"
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    31
#endif
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    32
46973
149e5319c938 8186734: AIX build broken after 8186166: Generalize Atomic::cmpxchg with templates
mdoerr
parents: 46958
diff changeset
    33
#include "utilities/debug.hpp"
149e5319c938 8186734: AIX build broken after 8186166: Generalize Atomic::cmpxchg with templates
mdoerr
parents: 46958
diff changeset
    34
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    35
// Implementation of class atomic
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    36
22867
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
    37
//
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    38
// machine barrier instructions:
22867
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
    39
//
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    40
// - sync            two-way memory barrier, aka fence
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    41
// - lwsync          orders  Store|Store,
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    42
//                            Load|Store,
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    43
//                            Load|Load,
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    44
//                   but not Store|Load
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    45
// - eieio           orders memory accesses for device memory (only)
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    46
// - isync           invalidates speculatively executed instructions
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    47
//                   From the POWER ISA 2.06 documentation:
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    48
//                    "[...] an isync instruction prevents the execution of
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    49
//                   instructions following the isync until instructions
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    50
//                   preceding the isync have completed, [...]"
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    51
//                   From IBM's AIX assembler reference:
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    52
//                    "The isync [...] instructions causes the processor to
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    53
//                   refetch any instructions that might have been fetched
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    54
//                   prior to the isync instruction. The instruction isync
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    55
//                   causes the processor to wait for all previous instructions
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    56
//                   to complete. Then any instructions already fetched are
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    57
//                   discarded and instruction processing continues in the
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    58
//                   environment established by the previous instructions."
22867
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
    59
//
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    60
// semantic barrier instructions:
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    61
// (as defined in orderAccess.hpp)
22867
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
    62
//
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    63
// - release         orders Store|Store,       (maps to lwsync)
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    64
//                           Load|Store
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    65
// - acquire         orders  Load|Store,       (maps to lwsync)
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    66
//                           Load|Load
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    67
// - fence           orders Store|Store,       (maps to sync)
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    68
//                           Load|Store,
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    69
//                           Load|Load,
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    70
//                          Store|Load
22867
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
    71
//
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    72
22867
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
    73
#define strasm_sync                       "\n  sync    \n"
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
    74
#define strasm_lwsync                     "\n  lwsync  \n"
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
    75
#define strasm_isync                      "\n  isync   \n"
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
    76
#define strasm_release                    strasm_lwsync
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
    77
#define strasm_acquire                    strasm_lwsync
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
    78
#define strasm_fence                      strasm_sync
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
    79
#define strasm_nobarrier                  ""
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
    80
#define strasm_nobarrier_clobber_memory   ""
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
    81
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    82
inline void pre_membar(atomic_memory_order order) {
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    83
  switch (order) {
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    84
    case memory_order_relaxed:
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    85
    case memory_order_acquire: break;
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    86
    case memory_order_release:
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    87
    case memory_order_acq_rel: __asm__ __volatile__ (strasm_lwsync); break;
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    88
    default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break;
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    89
  }
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    90
}
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    91
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    92
inline void post_membar(atomic_memory_order order) {
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    93
  switch (order) {
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    94
    case memory_order_relaxed:
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    95
    case memory_order_release: break;
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    96
    case memory_order_acquire:
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    97
    case memory_order_acq_rel: __asm__ __volatile__ (strasm_isync); break;
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    98
    default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break;
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
    99
  }
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   100
}
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   101
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   102
46993
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   103
template<size_t byte_size>
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   104
struct Atomic::PlatformAdd
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   105
  : Atomic::AddAndFetch<Atomic::PlatformAdd<byte_size> >
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   106
{
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   107
  template<typename I, typename D>
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   108
  D add_and_fetch(I add_value, D volatile* dest, atomic_memory_order order) const;
46993
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   109
};
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   110
46993
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   111
template<>
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   112
template<typename I, typename D>
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   113
inline D Atomic::PlatformAdd<4>::add_and_fetch(I add_value, D volatile* dest,
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   114
                                               atomic_memory_order order) const {
47091
4cc46bb5057b 8186855: Multiple platforms broken after 8186476: Generalize Atomic::add with templates
glaubitz
parents: 46993
diff changeset
   115
  STATIC_ASSERT(4 == sizeof(I));
4cc46bb5057b 8186855: Multiple platforms broken after 8186476: Generalize Atomic::add with templates
glaubitz
parents: 46993
diff changeset
   116
  STATIC_ASSERT(4 == sizeof(D));
46993
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   117
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   118
  D result;
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   119
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   120
  pre_membar(order);
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   121
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   122
  __asm__ __volatile__ (
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   123
    "1: lwarx   %0,  0, %2    \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   124
    "   add     %0, %0, %1    \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   125
    "   stwcx.  %0,  0, %2    \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   126
    "   bne-    1b            \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   127
    : /*%0*/"=&r" (result)
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   128
    : /*%1*/"r" (add_value), /*%2*/"r" (dest)
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   129
    : "cc", "memory" );
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   130
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   131
  post_membar(order);
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   132
46993
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   133
  return result;
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   134
}
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   135
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   136
46993
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   137
template<>
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   138
template<typename I, typename D>
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   139
inline D Atomic::PlatformAdd<8>::add_and_fetch(I add_value, D volatile* dest,
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   140
                                               atomic_memory_order order) const {
47091
4cc46bb5057b 8186855: Multiple platforms broken after 8186476: Generalize Atomic::add with templates
glaubitz
parents: 46993
diff changeset
   141
  STATIC_ASSERT(8 == sizeof(I));
4cc46bb5057b 8186855: Multiple platforms broken after 8186476: Generalize Atomic::add with templates
glaubitz
parents: 46993
diff changeset
   142
  STATIC_ASSERT(8 == sizeof(D));
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   143
46993
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   144
  D result;
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   145
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   146
  pre_membar(order);
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   147
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   148
  __asm__ __volatile__ (
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   149
    "1: ldarx   %0,  0, %2    \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   150
    "   add     %0, %0, %1    \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   151
    "   stdcx.  %0,  0, %2    \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   152
    "   bne-    1b            \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   153
    : /*%0*/"=&r" (result)
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   154
    : /*%1*/"r" (add_value), /*%2*/"r" (dest)
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   155
    : "cc", "memory" );
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   156
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   157
  post_membar(order);
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   158
46993
dd0f91c85ffc 8186476: Generalize Atomic::add with templates
eosterlund
parents: 46973
diff changeset
   159
  return result;
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   160
}
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   161
47578
09c41c4913d9 8187977: Generalize Atomic::xchg to use templates
eosterlund
parents: 47552
diff changeset
   162
template<>
09c41c4913d9 8187977: Generalize Atomic::xchg to use templates
eosterlund
parents: 47552
diff changeset
   163
template<typename T>
09c41c4913d9 8187977: Generalize Atomic::xchg to use templates
eosterlund
parents: 47552
diff changeset
   164
inline T Atomic::PlatformXchg<4>::operator()(T exchange_value,
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   165
                                             T volatile* dest,
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   166
                                             atomic_memory_order order) const {
47634
6a0c42c40cd1 8188220: Remove Atomic::*_ptr() uses and overloads from hotspot
coleenp
parents: 47593
diff changeset
   167
  // Note that xchg doesn't necessarily do an acquire
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   168
  // (see synchronizer.cpp).
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   169
47578
09c41c4913d9 8187977: Generalize Atomic::xchg to use templates
eosterlund
parents: 47552
diff changeset
   170
  T old_value;
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   171
  const uint64_t zero = 0;
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   172
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   173
  pre_membar(order);
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   174
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   175
  __asm__ __volatile__ (
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   176
    /* atomic loop */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   177
    "1:                                                 \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   178
    "   lwarx   %[old_value], %[dest], %[zero]          \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   179
    "   stwcx.  %[exchange_value], %[dest], %[zero]     \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   180
    "   bne-    1b                                      \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   181
    /* exit */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   182
    "2:                                                 \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   183
    /* out */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   184
    : [old_value]       "=&r"   (old_value),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   185
                        "=m"    (*dest)
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   186
    /* in */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   187
    : [dest]            "b"     (dest),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   188
      [zero]            "r"     (zero),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   189
      [exchange_value]  "r"     (exchange_value),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   190
                        "m"     (*dest)
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   191
    /* clobber */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   192
    : "cc",
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   193
      "memory"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   194
    );
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   195
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   196
  post_membar(order);
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   197
47578
09c41c4913d9 8187977: Generalize Atomic::xchg to use templates
eosterlund
parents: 47552
diff changeset
   198
  return old_value;
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   199
}
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   200
47578
09c41c4913d9 8187977: Generalize Atomic::xchg to use templates
eosterlund
parents: 47552
diff changeset
   201
template<>
09c41c4913d9 8187977: Generalize Atomic::xchg to use templates
eosterlund
parents: 47552
diff changeset
   202
template<typename T>
09c41c4913d9 8187977: Generalize Atomic::xchg to use templates
eosterlund
parents: 47552
diff changeset
   203
inline T Atomic::PlatformXchg<8>::operator()(T exchange_value,
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   204
                                             T volatile* dest,
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   205
                                             atomic_memory_order order) const {
47578
09c41c4913d9 8187977: Generalize Atomic::xchg to use templates
eosterlund
parents: 47552
diff changeset
   206
  STATIC_ASSERT(8 == sizeof(T));
47634
6a0c42c40cd1 8188220: Remove Atomic::*_ptr() uses and overloads from hotspot
coleenp
parents: 47593
diff changeset
   207
  // Note that xchg doesn't necessarily do an acquire
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   208
  // (see synchronizer.cpp).
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   209
47578
09c41c4913d9 8187977: Generalize Atomic::xchg to use templates
eosterlund
parents: 47552
diff changeset
   210
  T old_value;
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   211
  const uint64_t zero = 0;
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   212
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   213
  pre_membar(order);
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   214
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   215
  __asm__ __volatile__ (
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   216
    /* atomic loop */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   217
    "1:                                                 \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   218
    "   ldarx   %[old_value], %[dest], %[zero]          \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   219
    "   stdcx.  %[exchange_value], %[dest], %[zero]     \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   220
    "   bne-    1b                                      \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   221
    /* exit */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   222
    "2:                                                 \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   223
    /* out */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   224
    : [old_value]       "=&r"   (old_value),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   225
                        "=m"    (*dest)
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   226
    /* in */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   227
    : [dest]            "b"     (dest),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   228
      [zero]            "r"     (zero),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   229
      [exchange_value]  "r"     (exchange_value),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   230
                        "m"     (*dest)
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   231
    /* clobber */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   232
    : "cc",
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   233
      "memory"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   234
    );
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   235
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   236
  post_membar(order);
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   237
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   238
  return old_value;
39404
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   239
}
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   240
46958
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   241
template<>
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   242
template<typename T>
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   243
inline T Atomic::PlatformCmpxchg<1>::operator()(T exchange_value,
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   244
                                                T volatile* dest,
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   245
                                                T compare_value,
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   246
                                                atomic_memory_order order) const {
46973
149e5319c938 8186734: AIX build broken after 8186166: Generalize Atomic::cmpxchg with templates
mdoerr
parents: 46958
diff changeset
   247
  STATIC_ASSERT(1 == sizeof(T));
35063
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   248
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   249
  // Note that cmpxchg guarantees a two-way memory barrier across
39404
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   250
  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   251
  // specified otherwise (see atomic.hpp).
35063
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   252
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   253
  // Using 32 bit internally.
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   254
  volatile int *dest_base = (volatile int*)((uintptr_t)dest & ~3);
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   255
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   256
#ifdef VM_LITTLE_ENDIAN
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   257
  const unsigned int shift_amount        = ((uintptr_t)dest & 3) * 8;
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   258
#else
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   259
  const unsigned int shift_amount        = ((~(uintptr_t)dest) & 3) * 8;
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   260
#endif
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   261
  const unsigned int masked_compare_val  = ((unsigned int)(unsigned char)compare_value),
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   262
                     masked_exchange_val = ((unsigned int)(unsigned char)exchange_value),
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   263
                     xor_value           = (masked_compare_val ^ masked_exchange_val) << shift_amount;
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   264
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   265
  unsigned int old_value, value32;
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   266
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   267
  pre_membar(order);
39404
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   268
35063
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   269
  __asm__ __volatile__ (
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   270
    /* simple guard */
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   271
    "   lbz     %[old_value], 0(%[dest])                  \n"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   272
    "   cmpw    %[masked_compare_val], %[old_value]       \n"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   273
    "   bne-    2f                                        \n"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   274
    /* atomic loop */
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   275
    "1:                                                   \n"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   276
    "   lwarx   %[value32], 0, %[dest_base]               \n"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   277
    /* extract byte and compare */
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   278
    "   srd     %[old_value], %[value32], %[shift_amount] \n"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   279
    "   clrldi  %[old_value], %[old_value], 56            \n"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   280
    "   cmpw    %[masked_compare_val], %[old_value]       \n"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   281
    "   bne-    2f                                        \n"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   282
    /* replace byte and try to store */
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   283
    "   xor     %[value32], %[xor_value], %[value32]      \n"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   284
    "   stwcx.  %[value32], 0, %[dest_base]               \n"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   285
    "   bne-    1b                                        \n"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   286
    /* exit */
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   287
    "2:                                                   \n"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   288
    /* out */
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   289
    : [old_value]           "=&r"   (old_value),
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   290
      [value32]             "=&r"   (value32),
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   291
                            "=m"    (*dest),
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   292
                            "=m"    (*dest_base)
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   293
    /* in */
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   294
    : [dest]                "b"     (dest),
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   295
      [dest_base]           "b"     (dest_base),
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   296
      [shift_amount]        "r"     (shift_amount),
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   297
      [masked_compare_val]  "r"     (masked_compare_val),
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   298
      [xor_value]           "r"     (xor_value),
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   299
                            "m"     (*dest),
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   300
                            "m"     (*dest_base)
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   301
    /* clobber */
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   302
    : "cc",
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   303
      "memory"
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   304
    );
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   305
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   306
  post_membar(order);
39404
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   307
46958
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   308
  return PrimitiveConversions::cast<T>((unsigned char)old_value);
35063
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   309
}
cb24277be2e7 8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents: 25715
diff changeset
   310
46958
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   311
template<>
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   312
template<typename T>
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   313
inline T Atomic::PlatformCmpxchg<4>::operator()(T exchange_value,
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   314
                                                T volatile* dest,
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   315
                                                T compare_value,
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   316
                                                atomic_memory_order order) const {
46973
149e5319c938 8186734: AIX build broken after 8186166: Generalize Atomic::cmpxchg with templates
mdoerr
parents: 46958
diff changeset
   317
  STATIC_ASSERT(4 == sizeof(T));
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   318
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   319
  // Note that cmpxchg guarantees a two-way memory barrier across
39404
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   320
  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   321
  // specified otherwise (see atomic.hpp).
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   322
46958
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   323
  T old_value;
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   324
  const uint64_t zero = 0;
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   325
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   326
  pre_membar(order);
39404
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   327
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   328
  __asm__ __volatile__ (
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   329
    /* simple guard */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   330
    "   lwz     %[old_value], 0(%[dest])                \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   331
    "   cmpw    %[compare_value], %[old_value]          \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   332
    "   bne-    2f                                      \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   333
    /* atomic loop */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   334
    "1:                                                 \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   335
    "   lwarx   %[old_value], %[dest], %[zero]          \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   336
    "   cmpw    %[compare_value], %[old_value]          \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   337
    "   bne-    2f                                      \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   338
    "   stwcx.  %[exchange_value], %[dest], %[zero]     \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   339
    "   bne-    1b                                      \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   340
    /* exit */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   341
    "2:                                                 \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   342
    /* out */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   343
    : [old_value]       "=&r"   (old_value),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   344
                        "=m"    (*dest)
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   345
    /* in */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   346
    : [dest]            "b"     (dest),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   347
      [zero]            "r"     (zero),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   348
      [compare_value]   "r"     (compare_value),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   349
      [exchange_value]  "r"     (exchange_value),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   350
                        "m"     (*dest)
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   351
    /* clobber */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   352
    : "cc",
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   353
      "memory"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   354
    );
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   355
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   356
  post_membar(order);
39404
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   357
46958
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   358
  return old_value;
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   359
}
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   360
46958
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   361
template<>
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   362
template<typename T>
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   363
inline T Atomic::PlatformCmpxchg<8>::operator()(T exchange_value,
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   364
                                                T volatile* dest,
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   365
                                                T compare_value,
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   366
                                                atomic_memory_order order) const {
46973
149e5319c938 8186734: AIX build broken after 8186166: Generalize Atomic::cmpxchg with templates
mdoerr
parents: 46958
diff changeset
   367
  STATIC_ASSERT(8 == sizeof(T));
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   368
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   369
  // Note that cmpxchg guarantees a two-way memory barrier across
39404
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   370
  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   371
  // specified otherwise (see atomic.hpp).
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   372
46958
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   373
  T old_value;
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   374
  const uint64_t zero = 0;
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   375
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   376
  pre_membar(order);
39404
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   377
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   378
  __asm__ __volatile__ (
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   379
    /* simple guard */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   380
    "   ld      %[old_value], 0(%[dest])                \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   381
    "   cmpd    %[compare_value], %[old_value]          \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   382
    "   bne-    2f                                      \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   383
    /* atomic loop */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   384
    "1:                                                 \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   385
    "   ldarx   %[old_value], %[dest], %[zero]          \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   386
    "   cmpd    %[compare_value], %[old_value]          \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   387
    "   bne-    2f                                      \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   388
    "   stdcx.  %[exchange_value], %[dest], %[zero]     \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   389
    "   bne-    1b                                      \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   390
    /* exit */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   391
    "2:                                                 \n"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   392
    /* out */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   393
    : [old_value]       "=&r"   (old_value),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   394
                        "=m"    (*dest)
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   395
    /* in */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   396
    : [dest]            "b"     (dest),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   397
      [zero]            "r"     (zero),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   398
      [compare_value]   "r"     (compare_value),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   399
      [exchange_value]  "r"     (exchange_value),
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   400
                        "m"     (*dest)
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   401
    /* clobber */
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   402
    : "cc",
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   403
      "memory"
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   404
    );
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   405
50029
ea0a16ba6ac0 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
mdoerr
parents: 47634
diff changeset
   406
  post_membar(order);
39404
d0ad5220e91c 8155949: Support relaxed semantics in cmpxchg
mdoerr
parents: 35594
diff changeset
   407
46958
a13bd8c6b7a2 8186166: Generalize Atomic::cmpxchg with templates
eosterlund
parents: 46523
diff changeset
   408
  return old_value;
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   409
}
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   410
22867
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
   411
#undef strasm_sync
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
   412
#undef strasm_lwsync
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
   413
#undef strasm_isync
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
   414
#undef strasm_release
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
   415
#undef strasm_acquire
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
   416
#undef strasm_fence
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
   417
#undef strasm_nobarrier
309bcf262a19 8031319: PPC64: Some fixes in ppc and aix coding.
goetz
parents: 22831
diff changeset
   418
#undef strasm_nobarrier_clobber_memory
22831
1e2ba1d62103 8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff changeset
   419
40655
9f644073d3a0 8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents: 39404
diff changeset
   420
#endif // OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_HPP