Debian Codegraph @

src/csky/ffitarget.h

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