Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/hotspot/cpu/aarch64/foreign_globals_aarch64.hpp
40930 views
1
/*
2
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
3
* Copyright (c) 2019, Arm Limited. All rights reserved.
4
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
*
6
* This code is free software; you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License version 2 only, as
8
* published by the Free Software Foundation.
9
*
10
* This code is distributed in the hope that it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13
* version 2 for more details (a copy is included in the LICENSE file that
14
* accompanied this code).
15
*
16
* You should have received a copy of the GNU General Public License version
17
* 2 along with this work; if not, write to the Free Software Foundation,
18
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19
*
20
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21
* or visit www.oracle.com if you need additional information or have any
22
* questions.
23
*/
24
25
#ifndef CPU_AARCH64_VM_FOREIGN_GLOBALS_AARCH64_HPP
26
#define CPU_AARCH64_VM_FOREIGN_GLOBALS_AARCH64_HPP
27
28
#include "asm/macroAssembler.hpp"
29
#include "utilities/growableArray.hpp"
30
31
constexpr size_t float_reg_size = 16; // bytes
32
33
struct ABIDescriptor {
34
GrowableArray<Register> _integer_argument_registers;
35
GrowableArray<Register> _integer_return_registers;
36
GrowableArray<FloatRegister> _vector_argument_registers;
37
GrowableArray<FloatRegister> _vector_return_registers;
38
39
GrowableArray<Register> _integer_additional_volatile_registers;
40
GrowableArray<FloatRegister> _vector_additional_volatile_registers;
41
42
int32_t _stack_alignment_bytes;
43
int32_t _shadow_space_bytes;
44
45
bool is_volatile_reg(Register reg) const;
46
bool is_volatile_reg(FloatRegister reg) const;
47
};
48
49
struct BufferLayout {
50
size_t stack_args_bytes;
51
size_t stack_args;
52
size_t arguments_vector;
53
size_t arguments_integer;
54
size_t arguments_next_pc;
55
size_t returns_vector;
56
size_t returns_integer;
57
size_t buffer_size;
58
};
59
60
#endif // CPU_AARCH64_VM_FOREIGN_GLOBALS_AARCH64_HPP
61
62