Lines 27-34
Link Here
|
27 |
#ifndef LIBFFI_TARGET_H |
27 |
#ifndef LIBFFI_TARGET_H |
28 |
#define LIBFFI_TARGET_H |
28 |
#define LIBFFI_TARGET_H |
29 |
|
29 |
|
30 |
#ifdef linux |
30 |
#if defined(linux) || defined (__sgi) |
31 |
#include <asm/sgidefs.h> |
31 |
# ifdef linux |
|
|
32 |
# include <asm/sgidefs.h> |
33 |
# endif |
34 |
# ifdef __sgi |
35 |
# include <sgidefs.h> |
36 |
# endif |
32 |
# ifndef _ABIN32 |
37 |
# ifndef _ABIN32 |
33 |
# define _ABIN32 _MIPS_SIM_NABI32 |
38 |
# define _ABIN32 _MIPS_SIM_NABI32 |
34 |
# endif |
39 |
# endif |
Lines 41-47
Link Here
|
41 |
#endif |
46 |
#endif |
42 |
|
47 |
|
43 |
#if !defined(_MIPS_SIM) |
48 |
#if !defined(_MIPS_SIM) |
44 |
-- something is very wrong -- |
49 |
# error -- something is very wrong -- |
45 |
#else |
50 |
#else |
46 |
# if (_MIPS_SIM==_ABIN32 && defined(_ABIN32)) || (_MIPS_SIM==_ABI64 && defined(_ABI64)) |
51 |
# if (_MIPS_SIM==_ABIN32 && defined(_ABIN32)) || (_MIPS_SIM==_ABI64 && defined(_ABI64)) |
47 |
# define FFI_MIPS_N32 |
52 |
# define FFI_MIPS_N32 |
Lines 49-55
Link Here
|
49 |
# if (_MIPS_SIM==_ABIO32 && defined(_ABIO32)) |
54 |
# if (_MIPS_SIM==_ABIO32 && defined(_ABIO32)) |
50 |
# define FFI_MIPS_O32 |
55 |
# define FFI_MIPS_O32 |
51 |
# else |
56 |
# else |
52 |
-- this is an unsupported platform -- |
57 |
# error -- this is an unsupported platform -- |
53 |
# endif |
58 |
# endif |
54 |
# endif |
59 |
# endif |
55 |
#endif |
60 |
#endif |
Lines 145-158
Link Here
|
145 |
# endif /* _MIPS_SIM==_ABI64 */ |
150 |
# endif /* _MIPS_SIM==_ABI64 */ |
146 |
#endif /* !FFI_MIPS_O32 */ |
151 |
#endif /* !FFI_MIPS_O32 */ |
147 |
#else /* !LIBFFI_ASM */ |
152 |
#else /* !LIBFFI_ASM */ |
148 |
#ifdef FFI_MIPS_O32 |
153 |
#ifdef __GNUC__ |
|
|
154 |
# ifdef FFI_MIPS_O32 |
149 |
/* O32 stack frames have 32bit integer args */ |
155 |
/* O32 stack frames have 32bit integer args */ |
150 |
typedef unsigned int ffi_arg __attribute__((__mode__(__SI__))); |
156 |
typedef unsigned int ffi_arg __attribute__((__mode__(__SI__))); |
151 |
typedef signed int ffi_sarg __attribute__((__mode__(__SI__))); |
157 |
typedef signed int ffi_sarg __attribute__((__mode__(__SI__))); |
152 |
#else |
158 |
# else |
153 |
/* N32 and N64 frames have 64bit integer args */ |
159 |
/* N32 and N64 frames have 64bit integer args */ |
154 |
typedef unsigned int ffi_arg __attribute__((__mode__(__DI__))); |
160 |
typedef unsigned int ffi_arg __attribute__((__mode__(__DI__))); |
155 |
typedef signed int ffi_sarg __attribute__((__mode__(__DI__))); |
161 |
typedef signed int ffi_sarg __attribute__((__mode__(__DI__))); |
|
|
162 |
# endif |
163 |
#else |
164 |
# ifdef FFI_MIPS_O32 |
165 |
/* O32 stack frames have 32bit integer args */ |
166 |
typedef __uint32_t ffi_arg; |
167 |
typedef __int32_t ffi_sarg; |
168 |
# else |
169 |
/* N32 and N64 frames have 64bit integer args */ |
170 |
typedef __uint64_t ffi_arg; |
171 |
typedef __int64_t ffi_sarg; |
172 |
# endif |
156 |
#endif |
173 |
#endif |
157 |
|
174 |
|
158 |
typedef enum ffi_abi { |
175 |
typedef enum ffi_abi { |