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