Merge branch 'master' of https://github.com/landonf/libffi-ios
This commit is contained in:
@@ -270,7 +270,12 @@ size_t ffi_java_raw_size (ffi_cif *cif);
|
|||||||
__declspec(align(8))
|
__declspec(align(8))
|
||||||
#endif
|
#endif
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
#if @FFI_EXEC_TRAMPOLINE_TABLE@
|
||||||
|
void *trampoline_table;
|
||||||
|
void *trampoline_table_entry;
|
||||||
|
#else
|
||||||
char tramp[FFI_TRAMPOLINE_SIZE];
|
char tramp[FFI_TRAMPOLINE_SIZE];
|
||||||
|
#endif
|
||||||
ffi_cif *cif;
|
ffi_cif *cif;
|
||||||
void (*fun)(ffi_cif*,void*,void**,void*);
|
void (*fun)(ffi_cif*,void*,void**,void*);
|
||||||
void *user_data;
|
void *user_data;
|
||||||
@@ -303,7 +308,12 @@ ffi_prep_closure_loc (ffi_closure*,
|
|||||||
# pragma pack 8
|
# pragma pack 8
|
||||||
#endif
|
#endif
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
#if @FFI_EXEC_TRAMPOLINE_TABLE@
|
||||||
|
void *trampoline_table;
|
||||||
|
void *trampoline_table_entry;
|
||||||
|
#else
|
||||||
char tramp[FFI_TRAMPOLINE_SIZE];
|
char tramp[FFI_TRAMPOLINE_SIZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
ffi_cif *cif;
|
ffi_cif *cif;
|
||||||
|
|
||||||
@@ -324,7 +334,12 @@ typedef struct {
|
|||||||
} ffi_raw_closure;
|
} ffi_raw_closure;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
#if @FFI_EXEC_TRAMPOLINE_TABLE@
|
||||||
|
void *trampoline_table;
|
||||||
|
void *trampoline_table_entry;
|
||||||
|
#else
|
||||||
char tramp[FFI_TRAMPOLINE_SIZE];
|
char tramp[FFI_TRAMPOLINE_SIZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
ffi_cif *cif;
|
ffi_cif *cif;
|
||||||
|
|
||||||
|
|||||||
@@ -147,23 +147,6 @@ _L__\name:
|
|||||||
.endm
|
.endm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.macro RETLDM regs=, cond=, dirn=ia
|
|
||||||
#if defined (__INTERWORKING__)
|
|
||||||
.ifc "\regs",""
|
|
||||||
ldr\cond lr, [sp], #4
|
|
||||||
.else
|
|
||||||
ldm\cond\dirn sp!, {\regs, lr}
|
|
||||||
.endif
|
|
||||||
bx\cond lr
|
|
||||||
#else
|
|
||||||
.ifc "\regs",""
|
|
||||||
ldr\cond pc, [sp], #4
|
|
||||||
.else
|
|
||||||
ldm\cond\dirn sp!, {\regs, pc}
|
|
||||||
.endif
|
|
||||||
#endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
@ r0: ffi_prep_args
|
@ r0: ffi_prep_args
|
||||||
@ r1: &ecif
|
@ r1: &ecif
|
||||||
@ r2: cif->bytes
|
@ r2: cif->bytes
|
||||||
@@ -187,7 +170,7 @@ ARM_FUNC_START ffi_call_SYSV
|
|||||||
@ r1 already set
|
@ r1 already set
|
||||||
|
|
||||||
@ Call ffi_prep_args(stack, &ecif)
|
@ Call ffi_prep_args(stack, &ecif)
|
||||||
bl ffi_prep_args
|
bl CNAME(ffi_prep_args)
|
||||||
|
|
||||||
@ move first 4 parameters in registers
|
@ move first 4 parameters in registers
|
||||||
ldmia sp, {r0-r3}
|
ldmia sp, {r0-r3}
|
||||||
@@ -335,7 +318,12 @@ ARM_FUNC_START ffi_closure_SYSV
|
|||||||
|
|
||||||
/* Below are VFP hard-float ABI call and closure implementations.
|
/* Below are VFP hard-float ABI call and closure implementations.
|
||||||
Add VFP FPU directive here. */
|
Add VFP FPU directive here. */
|
||||||
|
#ifndef __APPLE__
|
||||||
|
/* XXX - .fpu pseudo-directive is not supported by Apple's assembler,
|
||||||
|
and VFP hard-float calling conventions are not supported by the
|
||||||
|
compiler. */
|
||||||
.fpu vfp
|
.fpu vfp
|
||||||
|
#endif
|
||||||
|
|
||||||
@ r0: fn
|
@ r0: fn
|
||||||
@ r1: &ecif
|
@ r1: &ecif
|
||||||
@@ -362,7 +350,7 @@ ARM_FUNC_START ffi_call_VFP
|
|||||||
sub r2, fp, #64 @ VFP scratch space
|
sub r2, fp, #64 @ VFP scratch space
|
||||||
|
|
||||||
@ Call ffi_prep_args(stack, &ecif, vfp_space)
|
@ Call ffi_prep_args(stack, &ecif, vfp_space)
|
||||||
bl ffi_prep_args
|
bl CNAME(ffi_prep_args)
|
||||||
|
|
||||||
@ Load VFP register args if needed
|
@ Load VFP register args if needed
|
||||||
cmp r0, #0
|
cmp r0, #0
|
||||||
@@ -424,11 +412,18 @@ LSYM(Lbase_args):
|
|||||||
fstmiadeq r2, {d0-d3}
|
fstmiadeq r2, {d0-d3}
|
||||||
|
|
||||||
LSYM(Lepilogue_vfp):
|
LSYM(Lepilogue_vfp):
|
||||||
RETLDM "r0-r3,fp"
|
#if defined (__INTERWORKING__)
|
||||||
|
ldmia sp!, {r0-r3,fp, lr}
|
||||||
|
bx lr
|
||||||
|
#else
|
||||||
|
ldmia sp!, {r0-r3,fp, pc}
|
||||||
|
#endif
|
||||||
|
|
||||||
.ffi_call_VFP_end:
|
.ffi_call_VFP_end:
|
||||||
UNWIND .fnend
|
UNWIND .fnend
|
||||||
|
#ifdef __ELF__
|
||||||
.size CNAME(ffi_call_VFP),.ffi_call_VFP_end-CNAME(ffi_call_VFP)
|
.size CNAME(ffi_call_VFP),.ffi_call_VFP_end-CNAME(ffi_call_VFP)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
ARM_FUNC_START ffi_closure_VFP
|
ARM_FUNC_START ffi_closure_VFP
|
||||||
@@ -444,7 +439,7 @@ ARM_FUNC_START ffi_closure_VFP
|
|||||||
sub sp, sp, #72
|
sub sp, sp, #72
|
||||||
str sp, [sp, #64]
|
str sp, [sp, #64]
|
||||||
add r1, sp, #64
|
add r1, sp, #64
|
||||||
bl ffi_closure_SYSV_inner
|
bl CNAME(ffi_closure_SYSV_inner)
|
||||||
|
|
||||||
cmp r0, #FFI_TYPE_INT
|
cmp r0, #FFI_TYPE_INT
|
||||||
beq .Lretint_vfp
|
beq .Lretint_vfp
|
||||||
@@ -490,7 +485,9 @@ ARM_FUNC_START ffi_closure_VFP
|
|||||||
|
|
||||||
.ffi_closure_VFP_end:
|
.ffi_closure_VFP_end:
|
||||||
UNWIND .fnend
|
UNWIND .fnend
|
||||||
|
#ifdef __ELF__
|
||||||
.size CNAME(ffi_closure_VFP),.ffi_closure_VFP_end-CNAME(ffi_closure_VFP)
|
.size CNAME(ffi_closure_VFP),.ffi_closure_VFP_end-CNAME(ffi_closure_VFP)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined __ELF__ && defined __linux__
|
#if defined __ELF__ && defined __linux__
|
||||||
.section .note.GNU-stack,"",%progbits
|
.section .note.GNU-stack,"",%progbits
|
||||||
|
|||||||
Reference in New Issue
Block a user