Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(158428)

Side by Side Diff: Modules/_ctypes/libffi_ios/include/ffitarget_x86_64.h

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #ifdef __x86_64__
2
3 /* -----------------------------------------------------------------*-C-*-
4 ffitarget.h - Copyright (c) 2012, 2014 Anthony Green
5 Copyright (c) 1996-2003, 2010 Red Hat, Inc.
6 Copyright (C) 2008 Free Software Foundation, Inc.
7
8 Target configuration macros for x86 and x86-64.
9
10 Permission is hereby granted, free of charge, to any person obtaining
11 a copy of this software and associated documentation files (the
12 ``Software''), to deal in the Software without restriction, including
13 without limitation the rights to use, copy, modify, merge, publish,
14 distribute, sublicense, and/or sell copies of the Software, and to
15 permit persons to whom the Software is furnished to do so, subject to
16 the following conditions:
17
18 The above copyright notice and this permission notice shall be included
19 in all copies or substantial portions of the Software.
20
21 THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
22 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 DEALINGS IN THE SOFTWARE.
29
30 ----------------------------------------------------------------------- */
31
32 #ifndef LIBFFI_TARGET_H
33 #define LIBFFI_TARGET_H
34
35 #ifndef LIBFFI_H
36 #error "Please do not include ffitarget.h directly into your source. Use ffi.h instead."
37 #endif
38
39 /* ---- System specific configurations ----------------------------------- */
40
41 /* For code common to all platforms on x86 and x86_64. */
42 #define X86_ANY
43
44 #if defined (X86_64) && defined (__i386__)
45 #undef X86_64
46 #define X86
47 #endif
48
49 #ifdef X86_WIN64
50 #define FFI_SIZEOF_ARG 8
51 #define USE_BUILTIN_FFS 0 /* not yet implemented in mingw-64 */
52 #endif
53
54 #define FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION
55 #ifndef _MSC_VER
56 #define FFI_TARGET_HAS_COMPLEX_TYPE
57 #endif
58
59 /* ---- Generic type definitions ----------------------------------------- */
60
61 #ifndef LIBFFI_ASM
62 #ifdef X86_WIN64
63 #ifdef _MSC_VER
64 typedef unsigned __int64 ffi_arg;
65 typedef __int64 ffi_sarg;
66 #else
67 typedef unsigned long long ffi_arg;
68 typedef long long ffi_sarg;
69 #endif
70 #else
71 #if defined __x86_64__ && defined __ILP32__
72 #define FFI_SIZEOF_ARG 8
73 #define FFI_SIZEOF_JAVA_RAW 4
74 typedef unsigned long long ffi_arg;
75 typedef long long ffi_sarg;
76 #else
77 typedef unsigned long ffi_arg;
78 typedef signed long ffi_sarg;
79 #endif
80 #endif
81
82 typedef enum ffi_abi {
83 #if defined(X86_WIN64)
84 FFI_FIRST_ABI = 0,
85 FFI_WIN64,
86 FFI_LAST_ABI,
87 FFI_DEFAULT_ABI = FFI_WIN64
88
89 #elif defined(X86_64) || (defined (__x86_64__) && defined (X86_DARWIN))
90 FFI_FIRST_ABI = 1,
91 FFI_UNIX64,
92 FFI_LAST_ABI,
93 FFI_DEFAULT_ABI = FFI_UNIX64
94
95 #elif defined(X86_WIN32)
96 FFI_FIRST_ABI = 0,
97 FFI_SYSV = 1,
98 FFI_STDCALL = 2,
99 FFI_THISCALL = 3,
100 FFI_FASTCALL = 4,
101 FFI_MS_CDECL = 5,
102 FFI_PASCAL = 6,
103 FFI_REGISTER = 7,
104 FFI_LAST_ABI,
105 FFI_DEFAULT_ABI = FFI_MS_CDECL
106 #else
107 FFI_FIRST_ABI = 0,
108 FFI_SYSV = 1,
109 FFI_THISCALL = 3,
110 FFI_FASTCALL = 4,
111 FFI_STDCALL = 5,
112 FFI_PASCAL = 6,
113 FFI_REGISTER = 7,
114 FFI_MS_CDECL = 8,
115 FFI_LAST_ABI,
116 FFI_DEFAULT_ABI = FFI_SYSV
117 #endif
118 } ffi_abi;
119 #endif
120
121 /* ---- Definitions for closures ----------------------------------------- */
122
123 #define FFI_CLOSURES 1
124 #define FFI_GO_CLOSURES 1
125
126 #define FFI_TYPE_SMALL_STRUCT_1B (FFI_TYPE_LAST + 1)
127 #define FFI_TYPE_SMALL_STRUCT_2B (FFI_TYPE_LAST + 2)
128 #define FFI_TYPE_SMALL_STRUCT_4B (FFI_TYPE_LAST + 3)
129 #define FFI_TYPE_MS_STRUCT (FFI_TYPE_LAST + 4)
130
131 #if defined (X86_64) || defined(X86_WIN64) \
132 || (defined (__x86_64__) && defined (X86_DARWIN))
133 # define FFI_TRAMPOLINE_SIZE 24
134 # define FFI_NATIVE_RAW_API 0
135 #else
136 # define FFI_TRAMPOLINE_SIZE 12
137 # define FFI_NATIVE_RAW_API 1 /* x86 has native raw api support */
138 #endif
139
140 #endif
141
142
143
144 #endif
OLDNEW
« no previous file with comments | « Modules/_ctypes/libffi_ios/include/ffitarget_i386.h ('k') | Modules/_ctypes/libffi_ios/include/ffi_x86_64.h » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+