• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (c) 2009, 2010, 2011, 2012 ARM Ltd.
2 
3 Permission is hereby granted, free of charge, to any person obtaining
4 a copy of this software and associated documentation files (the
5 ``Software''), to deal in the Software without restriction, including
6 without limitation the rights to use, copy, modify, merge, publish,
7 distribute, sublicense, and/or sell copies of the Software, and to
8 permit persons to whom the Software is furnished to do so, subject to
9 the following conditions:
10 
11 The above copyright notice and this permission notice shall be
12 included in all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
15 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 SOFTWARE 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
64