@@ -39,6 +39,33 @@ struct ffi_aix_trampoline_struct {
3939 void * static_chain ; /* Pointer to closure */
4040};
4141
42+ /* Closure jump table indexes returned by ffi_closure_helper_common and
43+ consumed by the jump tables in aix_closure.S. These mirror the
44+ definitions in ffi_powerpc.h, which this file cannot include because
45+ it defines its own (differing) FLAG_* and ffi_dblfl. */
46+ #define PPC_LD_NONE 0
47+ #define PPC_LD_R3 1
48+ #define PPC_LD_R3R4 2
49+ #define PPC_LD_F32 3
50+ #define PPC_LD_F64 4
51+ #define PPC_LD_F128 5
52+ #define PPC_LD_U8 6
53+ #define PPC_LD_S8 7
54+ #define PPC_LD_U16 8
55+ #define PPC_LD_S16 9
56+
57+ #ifndef POWERPC64
58+ # define PPC_LD_U32 PPC_LD_R3
59+ # define PPC_LD_S32 PPC_LD_R3
60+ # define PPC_LD_PTR PPC_LD_R3
61+ # define PPC_LD_I64 PPC_LD_R3R4
62+ #else
63+ # define PPC_LD_U32 10
64+ # define PPC_LD_S32 11
65+ # define PPC_LD_PTR PPC_LD_R3
66+ # define PPC_LD_I64 PPC_LD_R3
67+ #endif
68+
4269extern void ffi_closure_ASM (void );
4370
4471#if defined (FFI_GO_CLOSURES )
@@ -1192,12 +1219,12 @@ typedef union
11921219 double d ;
11931220} ffi_dblfl ;
11941221
1195- ffi_type *
1222+ int
11961223ffi_closure_helper_DARWIN (ffi_closure * , void * ,
11971224 unsigned long * , ffi_dblfl * );
11981225
11991226#if defined (FFI_GO_CLOSURES )
1200- ffi_type *
1227+ int
12011228ffi_go_closure_helper_DARWIN (ffi_go_closure * , void * ,
12021229 unsigned long * , ffi_dblfl * );
12031230#endif
@@ -1209,7 +1236,7 @@ ffi_go_closure_helper_DARWIN (ffi_go_closure*, void *,
12091236 up space for a return value, ffi_closure_ASM invokes the
12101237 following helper function to do most of the work. */
12111238
1212- static ffi_type *
1239+ static int
12131240ffi_closure_helper_common (ffi_cif * cif ,
12141241 void (* fun )(ffi_cif * , void * , void * * , void * ),
12151242 void * user_data , void * rvalue ,
@@ -1485,7 +1512,7 @@ ffi_closure_helper_common (ffi_cif* cif,
14851512 }
14861513}
14871514
1488- ffi_type *
1515+ int
14891516ffi_closure_helper_DARWIN (ffi_closure * closure , void * rvalue ,
14901517 unsigned long * pgr , ffi_dblfl * pfr )
14911518{
@@ -1494,7 +1521,7 @@ ffi_closure_helper_DARWIN (ffi_closure *closure, void *rvalue,
14941521}
14951522
14961523#if defined (FFI_GO_CLOSURES )
1497- ffi_type *
1524+ int
14981525ffi_go_closure_helper_DARWIN (ffi_go_closure * closure , void * rvalue ,
14991526 unsigned long * pgr , ffi_dblfl * pfr )
15001527{
0 commit comments