diff options
Diffstat (limited to 'libffi/include/ffi_common.h')
-rw-r--r-- | libffi/include/ffi_common.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libffi/include/ffi_common.h b/libffi/include/ffi_common.h index 42cace91502..c179d68157b 100644 --- a/libffi/include/ffi_common.h +++ b/libffi/include/ffi_common.h @@ -1,7 +1,8 @@ /* ----------------------------------------------------------------------- - ffi_common.h - Copyright (c) 1996 Red Hat, Inc. - Copyright (C) 2007 Free Software Foundation, Inc - + ffi_common.h - Copyright (C) 2011, 2012 Anthony Green + Copyright (C) 2007 Free Software Foundation, Inc + Copyright (c) 1996 Red Hat, Inc. + Common internal definitions and macros. Only necessary for building libffi. ----------------------------------------------------------------------- */ @@ -74,6 +75,8 @@ void ffi_type_test(ffi_type *a, char *file, int line); /* Perform machine dependent cif processing */ ffi_status ffi_prep_cif_machdep(ffi_cif *cif); +ffi_status ffi_prep_cif_machdep_var(ffi_cif *cif, + unsigned int nfixedargs, unsigned int ntotalargs); /* Extended cif, used in callback from assembly routine */ typedef struct @@ -112,11 +115,14 @@ typedef signed int SINT64 __attribute__((__mode__(__DI__))); typedef float FLOAT32; +#ifndef __GNUC__ +#define __builtin_expect(x, expected_value) (x) +#endif +#define LIKELY(x) __builtin_expect(!!(x),1) +#define UNLIKELY(x) __builtin_expect((x)!=0,0) #ifdef __cplusplus } #endif #endif - - |