Path: blob/master/src/hotspot/cpu/aarch64/atomic_aarch64.hpp
40930 views
/* Copyright (c) 2021, Red Hat Inc. All rights reserved.1* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.2*3* This code is free software; you can redistribute it and/or modify it4* under the terms of the GNU General Public License version 2 only, as5* published by the Free Software Foundation.6*7* This code is distributed in the hope that it will be useful, but WITHOUT8* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or9* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License10* version 2 for more details (a copy is included in the LICENSE file that11* accompanied this code).12*13* You should have received a copy of the GNU General Public License version14* 2 along with this work; if not, write to the Free Software Foundation,15* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.16*17* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA18* or visit www.oracle.com if you need additional information or have any19* questions.20*21*/2223#ifndef CPU_AARCH64_ATOMIC_AARCH64_HPP24#define CPU_AARCH64_ATOMIC_AARCH64_HPP2526// Atomic stub implementation.27// Default implementations are in atomic_linux_aarch64.S28//29// All stubs pass arguments the same way30// x0: src/dest address31// x1: arg132// x2: arg2 (optional)33// x3, x8, x9: scratch34typedef uint64_t (*aarch64_atomic_stub_t)(volatile void *ptr, uint64_t arg1, uint64_t arg2);3536// Pointers to stubs37extern aarch64_atomic_stub_t aarch64_atomic_fetch_add_4_impl;38extern aarch64_atomic_stub_t aarch64_atomic_fetch_add_8_impl;39extern aarch64_atomic_stub_t aarch64_atomic_xchg_4_impl;40extern aarch64_atomic_stub_t aarch64_atomic_xchg_8_impl;41extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_1_impl;42extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_4_impl;43extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_impl;44extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_1_relaxed_impl;45extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_4_relaxed_impl;46extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_relaxed_impl;4748#endif // CPU_AARCH64_ATOMIC_AARCH64_HPP495051