annotate libffi/src/pa/ffitarget.h @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* -----------------------------------------------------------------*-C-*-
kono
parents:
diff changeset
2 ffitarget.h - Copyright (c) 2016 John David Anglin
kono
parents:
diff changeset
3 Copyright (c) 2012 Anthony Green
kono
parents:
diff changeset
4 Copyright (c) 1996-2003 Red Hat, Inc.
kono
parents:
diff changeset
5 Target configuration macros for hppa.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 Permission is hereby granted, free of charge, to any person obtaining
kono
parents:
diff changeset
8 a copy of this software and associated documentation files (the
kono
parents:
diff changeset
9 ``Software''), to deal in the Software without restriction, including
kono
parents:
diff changeset
10 without limitation the rights to use, copy, modify, merge, publish,
kono
parents:
diff changeset
11 distribute, sublicense, and/or sell copies of the Software, and to
kono
parents:
diff changeset
12 permit persons to whom the Software is furnished to do so, subject to
kono
parents:
diff changeset
13 the following conditions:
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 The above copyright notice and this permission notice shall be included
kono
parents:
diff changeset
16 in all copies or substantial portions of the Software.
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
kono
parents:
diff changeset
19 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
kono
parents:
diff changeset
20 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
kono
parents:
diff changeset
21 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
kono
parents:
diff changeset
22 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
kono
parents:
diff changeset
23 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
kono
parents:
diff changeset
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
kono
parents:
diff changeset
25 DEALINGS IN THE SOFTWARE.
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 ----------------------------------------------------------------------- */
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 #ifndef LIBFFI_TARGET_H
kono
parents:
diff changeset
30 #define LIBFFI_TARGET_H
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 #ifndef LIBFFI_H
kono
parents:
diff changeset
33 #error "Please do not include ffitarget.h directly into your source. Use ffi.h instead."
kono
parents:
diff changeset
34 #endif
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 /* ---- System specific configurations ----------------------------------- */
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 #ifndef LIBFFI_ASM
kono
parents:
diff changeset
39 typedef unsigned long ffi_arg;
kono
parents:
diff changeset
40 typedef signed long ffi_sarg;
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 typedef enum ffi_abi {
kono
parents:
diff changeset
43 FFI_FIRST_ABI = 0,
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 #ifdef PA_LINUX
kono
parents:
diff changeset
46 FFI_PA32,
kono
parents:
diff changeset
47 FFI_LAST_ABI,
kono
parents:
diff changeset
48 FFI_DEFAULT_ABI = FFI_PA32
kono
parents:
diff changeset
49 #endif
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 #ifdef PA_HPUX
kono
parents:
diff changeset
52 FFI_PA32,
kono
parents:
diff changeset
53 FFI_LAST_ABI,
kono
parents:
diff changeset
54 FFI_DEFAULT_ABI = FFI_PA32
kono
parents:
diff changeset
55 #endif
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 #ifdef PA64_HPUX
kono
parents:
diff changeset
58 #error "PA64_HPUX FFI is not yet implemented"
kono
parents:
diff changeset
59 FFI_PA64,
kono
parents:
diff changeset
60 FFI_LAST_ABI,
kono
parents:
diff changeset
61 FFI_DEFAULT_ABI = FFI_PA64
kono
parents:
diff changeset
62 #endif
kono
parents:
diff changeset
63 } ffi_abi;
kono
parents:
diff changeset
64 #endif
kono
parents:
diff changeset
65
kono
parents:
diff changeset
66 #define FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 /* ---- Definitions for closures ----------------------------------------- */
kono
parents:
diff changeset
69
kono
parents:
diff changeset
70 #define FFI_CLOSURES 1
kono
parents:
diff changeset
71 #define FFI_GO_CLOSURES 1
kono
parents:
diff changeset
72 #define FFI_NATIVE_RAW_API 0
kono
parents:
diff changeset
73
kono
parents:
diff changeset
74 #ifdef PA_LINUX
kono
parents:
diff changeset
75 #define FFI_TRAMPOLINE_SIZE 32
kono
parents:
diff changeset
76 #else
kono
parents:
diff changeset
77 #define FFI_TRAMPOLINE_SIZE 40
kono
parents:
diff changeset
78 #endif
kono
parents:
diff changeset
79
kono
parents:
diff changeset
80 #define FFI_TYPE_SMALL_STRUCT2 -1
kono
parents:
diff changeset
81 #define FFI_TYPE_SMALL_STRUCT3 -2
kono
parents:
diff changeset
82 #define FFI_TYPE_SMALL_STRUCT4 -3
kono
parents:
diff changeset
83 #define FFI_TYPE_SMALL_STRUCT5 -4
kono
parents:
diff changeset
84 #define FFI_TYPE_SMALL_STRUCT6 -5
kono
parents:
diff changeset
85 #define FFI_TYPE_SMALL_STRUCT7 -6
kono
parents:
diff changeset
86 #define FFI_TYPE_SMALL_STRUCT8 -7
kono
parents:
diff changeset
87 #endif