packing, even on 64-bit machines. I.e. on 64-bit machines longs
and doubles are followed by an empty 64-bit word. */
+#if !FFI_NATIVE_RAW_API
FFI_API
void ffi_java_raw_call (ffi_cif *cif,
void (*fn)(void),
void *rvalue,
ffi_java_raw *avalue);
+#endif
FFI_API
void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw);
void *user_data,
void *codeloc);
+#if !FFI_NATIVE_RAW_API
FFI_API ffi_status
ffi_prep_java_raw_closure (ffi_java_raw_closure*,
ffi_cif *cif,
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
void *user_data,
void *codeloc);
+#endif
#endif /* FFI_CLOSURES */
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+#ifdef __arm64__
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
return allocate_to_stack (state, stack, size, size);
}
-ffi_status
+ffi_status FFI_HIDDEN
ffi_prep_cif_machdep (ffi_cif *cif)
{
ffi_type *rtype = cif->rtype;
#if defined (__APPLE__)
/* Perform Apple-specific cif processing for variadic calls */
-ffi_status ffi_prep_cif_machdep_var(ffi_cif *cif,
- unsigned int nfixedargs,
- unsigned int ntotalargs)
+ffi_status FFI_HIDDEN
+ffi_prep_cif_machdep_var(ffi_cif *cif, unsigned int nfixedargs,
+ unsigned int ntotalargs)
{
ffi_status status = ffi_prep_cif_machdep (cif);
cif->aarch64_nfixedargs = nfixedargs;
return flags;
}
+
+#endif /* __arm64__ */
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+#ifdef __arm64__
#define LIBFFI_ASM
#include <fficonfig.h>
#include <ffi.h>
cfi_endproc
.globl CNAME(ffi_call_SYSV)
+ FFI_HIDDEN(CNAME(ffi_call_SYSV))
#ifdef __ELF__
.type CNAME(ffi_call_SYSV), #function
- .hidden CNAME(ffi_call_SYSV)
.size CNAME(ffi_call_SYSV), .-CNAME(ffi_call_SYSV)
#endif
cfi_endproc
.globl CNAME(ffi_closure_SYSV_V)
+ FFI_HIDDEN(CNAME(ffi_closure_SYSV_V))
#ifdef __ELF__
.type CNAME(ffi_closure_SYSV_V), #function
- .hidden CNAME(ffi_closure_SYSV_V)
.size CNAME(ffi_closure_SYSV_V), . - CNAME(ffi_closure_SYSV_V)
#endif
cfi_endproc
.globl CNAME(ffi_closure_SYSV)
+ FFI_HIDDEN(CNAME(ffi_closure_SYSV))
#ifdef __ELF__
.type CNAME(ffi_closure_SYSV), #function
- .hidden CNAME(ffi_closure_SYSV)
.size CNAME(ffi_closure_SYSV), . - CNAME(ffi_closure_SYSV)
#endif
.endr
.globl CNAME(ffi_closure_trampoline_table_page)
+ FFI_HIDDEN(CNAME(ffi_closure_trampoline_table_page))
#ifdef __ELF__
.type CNAME(ffi_closure_trampoline_table_page), #function
- .hidden CNAME(ffi_closure_trampoline_table_page)
.size CNAME(ffi_closure_trampoline_table_page), . - CNAME(ffi_closure_trampoline_table_page)
#endif
#endif
cfi_endproc
.globl CNAME(ffi_go_closure_SYSV_V)
+ FFI_HIDDEN(CNAME(ffi_go_closure_SYSV_V))
#ifdef __ELF__
.type CNAME(ffi_go_closure_SYSV_V), #function
- .hidden CNAME(ffi_go_closure_SYSV_V)
.size CNAME(ffi_go_closure_SYSV_V), . - CNAME(ffi_go_closure_SYSV_V)
#endif
cfi_endproc
.globl CNAME(ffi_go_closure_SYSV)
+ FFI_HIDDEN(CNAME(ffi_go_closure_SYSV))
#ifdef __ELF__
.type CNAME(ffi_go_closure_SYSV), #function
- .hidden CNAME(ffi_go_closure_SYSV)
.size CNAME(ffi_go_closure_SYSV), . - CNAME(ffi_go_closure_SYSV)
#endif
#endif /* FFI_GO_CLOSURES */
+#endif /* __arm64__ */
#if defined __ELF__ && defined __linux__
.section .note.GNU-stack,"",%progbits
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
+#ifdef __arm__
#include <fficonfig.h>
#include <ffi.h>
#include <ffi_common.h>
}
/* Perform machine dependent cif processing */
-ffi_status
+ffi_status FFI_HIDDEN
ffi_prep_cif_machdep (ffi_cif *cif)
{
int flags = 0, cabi = cif->abi;
}
/* Perform machine dependent cif processing for variadic calls */
-ffi_status
+ffi_status FFI_HIDDEN
ffi_prep_cif_machdep_var (ffi_cif * cif,
unsigned int nfixedargs, unsigned int ntotalargs)
{
break;
}
}
+
+#endif /* __arm__ */
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
+#ifdef __arm__
#define LIBFFI_ASM
#include <fficonfig.h>
#include <ffi.h>
ARM_FUNC_END(ffi_arm_trampoline)
#endif /* FFI_EXEC_TRAMPOLINE_TABLE */
+#endif /* __arm__ */
#if defined __ELF__ && defined __linux__
.section .note.GNU-stack,"",%progbits
struct ffi_trampoline_table_entry
{
- void *(*trampoline) ();
+ void *(*trampoline) (void);
ffi_trampoline_table_entry *next;
};
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
-#ifndef __x86_64__
+#ifdef __i386__
#include <ffi.h>
#include <ffi_common.h>
#include <stdint.h>
ffi_call_i386 (frame, stack);
}
#endif /* !FFI_NO_RAW_API */
-#endif /* !__x86_64__ */
+#endif /* __i386__ */
/* The X86_64_SSEUP_CLASS should be always preceded by
X86_64_SSE_CLASS or X86_64_SSEUP_CLASS. */
- if (classes[i] == X86_64_SSEUP_CLASS
+ if (i > 1 && classes[i] == X86_64_SSEUP_CLASS
&& classes[i - 1] != X86_64_SSE_CLASS
&& classes[i - 1] != X86_64_SSEUP_CLASS)
{
/* If X86_64_X87UP_CLASS isn't preceded by X86_64_X87_CLASS,
everything should be passed in memory. */
- if (classes[i] == X86_64_X87UP_CLASS
+ if (i > 1 && classes[i] == X86_64_X87UP_CLASS
&& (classes[i - 1] != X86_64_X87_CLASS))
{
/* The first one should never be X86_64_X87UP_CLASS. */
ffi_prep_cif_machdep_efi64(ffi_cif *cif);
#endif
-ffi_status
+ffi_status FFI_HIDDEN
ffi_prep_cif_machdep (ffi_cif *cif)
{
int gprcount, ssecount, i, avn, ngpr, nsse;
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
+#ifdef __x86_64__
#include <ffi.h>
#include <ffi_common.h>
#include <stdlib.h>
#ifdef X86_WIN64
#define EFI64(name) name
#else
-#define EFI64(name) name##_efi64
+#define EFI64(name) FFI_HIDDEN name##_efi64
#endif
struct win64_call_frame
extern void ffi_call_win64 (void *stack, struct win64_call_frame *,
void *closure) FFI_HIDDEN;
-ffi_status
+ffi_status FFI_HIDDEN
EFI64(ffi_prep_cif_machdep)(ffi_cif *cif)
{
int flags, n;
fun (cif, rvalue, avalue, user_data);
return flags;
}
+
+#endif /* __x86_64__ */
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
-#ifndef __x86_64__
+#ifdef __i386__
#ifndef _MSC_VER
#define LIBFFI_ASM
#endif /* __APPLE__ */
#endif /* ifndef _MSC_VER */
-#endif /* ifndef __x86_64__ */
+#endif /* ifdef __i386__ */
#if defined __ELF__ && defined __linux__
.section .note.GNU-stack,"",@progbits
+#ifdef __x86_64__
#define LIBFFI_ASM
#include <fficonfig.h>
#include <ffi.h>
.align 8
.globl C(ffi_call_win64)
+ FFI_HIDDEN(C(ffi_call_win64))
SEH(.seh_proc ffi_call_win64)
C(ffi_call_win64):
.align 8
.globl C(ffi_go_closure_win64)
+ FFI_HIDDEN(C(ffi_go_closure_win64))
SEH(.seh_proc ffi_go_closure_win64)
C(ffi_go_closure_win64):
.align 8
.globl C(ffi_closure_win64)
+ FFI_HIDDEN(C(ffi_closure_win64))
SEH(.seh_proc ffi_closure_win64)
C(ffi_closure_win64):
cfi_endproc
SEH(.seh_endproc)
+#endif /* __x86_64__ */
#if defined __ELF__ && defined __linux__
.section .note.GNU-stack,"",@progbits