Ruby: ext/fiddle/libffi-3.2.1/src/aarch64/ffitarget.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

ffitarget.h
Go to the documentation of this file.
1/* Copyright (c) 2009, 2010, 2011, 2012 ARM Ltd.
2
3Permission is hereby granted, free of charge, to any person obtaining
4a copy of this software and associated documentation files (the
5``Software''), to deal in the Software without restriction, including
6without limitation the rights to use, copy, modify, merge, publish,
7distribute, sublicense, and/or sell copies of the Software, and to
8permit persons to whom the Software is furnished to do so, subject to
9the following conditions:
10
11The above copyright notice and this permission notice shall be
12included in all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
15EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
21
22#ifndef LIBFFI_TARGET_H
23#define LIBFFI_TARGET_H
24
25#ifndef LIBFFI_H
26#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead."
27#endif
28
29#ifndef LIBFFI_ASM
30 typedef unsigned long ffi_arg;
31 typedef signed long ffi_sarg;
32
33 typedef enum ffi_abi
34 {
35 FFI_FIRST_ABI = 0,
36 FFI_SYSV,
37 FFI_LAST_ABI,
38 FFI_DEFAULT_ABI = FFI_SYSV
39 } ffi_abi;
40#endif
41
42/* ---- Definitions for closures ----------------------------------------- */
43
44#define FFI_CLOSURES 1
45#define FFI_TRAMPOLINE_SIZE 36
46#define FFI_NATIVE_RAW_API 0
47
48/* ---- Internal ---- */
49
50#if defined (__APPLE__)
51#define FFI_TARGET_SPECIFIC_VARIADIC
52#define FFI_EXTRA_CIF_FIELDS unsigned aarch64_flags; unsigned aarch64_nfixedargs
53#else
54#define FFI_EXTRA_CIF_FIELDS unsigned aarch64_flags
55#endif
56
57#define AARCH64_FFI_WITH_V_BIT 0
58
59#define AARCH64_N_XREG 32
60#define AARCH64_N_VREG 32
61#define AARCH64_CALL_CONTEXT_SIZE (AARCH64_N_XREG * 8 + AARCH64_N_VREG * 16)
62
63#endif
ffi_arg
unsigned long ffi_arg
Definition: ffitarget.h:30
ffi_abi
ffi_abi
Definition: ffitarget.h:34
FFI_SYSV
@ FFI_SYSV
Definition: ffitarget.h:36
FFI_DEFAULT_ABI
@ FFI_DEFAULT_ABI
Definition: ffitarget.h:38
FFI_FIRST_ABI
@ FFI_FIRST_ABI
Definition: ffitarget.h:35
FFI_LAST_ABI
@ FFI_LAST_ABI
Definition: ffitarget.h:37
ffi_sarg
signed long ffi_sarg
Definition: ffitarget.h:31