Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/hotspot/cpu/aarch64/atomic_aarch64.hpp
40930 views
1
/* Copyright (c) 2021, Red Hat Inc. All rights reserved.
2
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3
*
4
* This code is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License version 2 only, as
6
* published by the Free Software Foundation.
7
*
8
* This code is distributed in the hope that it will be useful, but WITHOUT
9
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11
* version 2 for more details (a copy is included in the LICENSE file that
12
* accompanied this code).
13
*
14
* You should have received a copy of the GNU General Public License version
15
* 2 along with this work; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
*
18
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19
* or visit www.oracle.com if you need additional information or have any
20
* questions.
21
*
22
*/
23
24
#ifndef CPU_AARCH64_ATOMIC_AARCH64_HPP
25
#define CPU_AARCH64_ATOMIC_AARCH64_HPP
26
27
// Atomic stub implementation.
28
// Default implementations are in atomic_linux_aarch64.S
29
//
30
// All stubs pass arguments the same way
31
// x0: src/dest address
32
// x1: arg1
33
// x2: arg2 (optional)
34
// x3, x8, x9: scratch
35
typedef uint64_t (*aarch64_atomic_stub_t)(volatile void *ptr, uint64_t arg1, uint64_t arg2);
36
37
// Pointers to stubs
38
extern aarch64_atomic_stub_t aarch64_atomic_fetch_add_4_impl;
39
extern aarch64_atomic_stub_t aarch64_atomic_fetch_add_8_impl;
40
extern aarch64_atomic_stub_t aarch64_atomic_xchg_4_impl;
41
extern aarch64_atomic_stub_t aarch64_atomic_xchg_8_impl;
42
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_1_impl;
43
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_4_impl;
44
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_impl;
45
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_1_relaxed_impl;
46
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_4_relaxed_impl;
47
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_relaxed_impl;
48
49
#endif // CPU_AARCH64_ATOMIC_AARCH64_HPP
50
51