Ruby  2.4.2p198(2017-09-14revision59899)
Data Structures | Macros | Typedefs | Functions
ffi_common.h File Reference
#include <fficonfig.h>
Include dependency graph for ffi_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  extended_cif
 

Macros

#define MAYBE_UNUSED
 
#define memcpy(d, s, n)   bcopy ((s), (d), (n))
 
#define FFI_ASSERT(x)
 
#define FFI_ASSERT_AT(x, f, l)
 
#define FFI_ASSERT_VALID_TYPE(x)
 
#define ALIGN(v, a)   (((((size_t) (v))-1) | ((a)-1))+1)
 
#define ALIGN_DOWN(v, a)   (((size_t) (v)) & -a)
 
#define __builtin_expect(x, expected_value)   (x)
 
#define LIKELY(x)   __builtin_expect(!!(x),1)
 
#define UNLIKELY(x)   __builtin_expect((x)!=0,0)
 

Typedefs

typedef unsigned int UINT8 __attribute__((__mode__(__QI__)))
 
typedef float FLOAT32
 

Functions

char * alloca ()
 
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)
 

Macro Definition Documentation

◆ __builtin_expect

#define __builtin_expect (   x,
  expected_value 
)    (x)

Definition at line 123 of file ffi_common.h.

◆ ALIGN

#define ALIGN (   v,
 
)    (((((size_t) (v))-1) | ((a)-1))+1)

◆ ALIGN_DOWN

#define ALIGN_DOWN (   v,
 
)    (((size_t) (v)) & -a)

Definition at line 78 of file ffi_common.h.

Referenced by ffi_prep_args().

◆ FFI_ASSERT

#define FFI_ASSERT (   x)

◆ FFI_ASSERT_AT

#define FFI_ASSERT_AT (   x,
  f,
 
)

Definition at line 73 of file ffi_common.h.

Referenced by ffi_type_test().

◆ FFI_ASSERT_VALID_TYPE

#define FFI_ASSERT_VALID_TYPE (   x)

Definition at line 74 of file ffi_common.h.

Referenced by ffi_prep_cif_core(), ffi_prep_cif_machdep(), and initialize_aggregate().

◆ LIKELY

#define LIKELY (   x)    __builtin_expect(!!(x),1)

◆ MAYBE_UNUSED

#define MAYBE_UNUSED

◆ memcpy

#define memcpy (   d,
  s,
 
)    bcopy ((s), (d), (n))

Definition at line 55 of file ffi_common.h.

Referenced by aarch64_prep_args(), addrinfo_ipv4_multicast_p(), addrinfo_list_new(), addrinfo_mload(), allocate_converted_string(), append_fspath(), assign_to_ffi_arg(), BSD_vfprintf(), copy_hfa_to_reg_or_stack(), copy_home_path(), date_strftime_with_tmx(), dln_find_1(), ffi_call(), ffi_closure_call_SYSV(), ffi_closure_helper_DARWIN(), ffi_closure_SYSV_inner(), ffi_closure_unix_inner(), ffi_init_trampoline(), ffi_java_ptrarray_to_raw(), ffi_prep_args(), ffi_prep_args_pa32(), ffi_prep_args_raw(), ffi_prep_args_SYSV(), ffi_prep_args_v8(), ffi_prep_args_v9(), ffi_prep_closure_loc(), ffi_ptrarray_to_raw(), ffi_put_arg(), fiddle_handle_sym(), flo_to_s(), fstrndup(), gc_setup_mark_bits(), gen_ivtbl_resize(), get_addr(), getaddrinfo(), getifaddrs(), getrusage_time(), glob_helper(), glob_make_pattern(), global_id(), gzfile_readpartial(), host_str(), ibf_dump_ci_entries(), ibf_dump_overwrite(), ibf_load_alloc(), inet_ntop(), inet_pton(), init_addrinfo(), inspect_errno(), inspect_int(), inspect_timeval_as_interval(), int_sip_post_update(), int_sip_pre_update(), internal_realloc(), io_reader(), ip_s_getaddress(), iso8601_timediv(), join_argv(), join_path(), load_transcoder_entry(), main(), makroom(), md5_process(), MD5_Update(), moreswitches(), nl_langinfo_codeset(), numeric_getaddrinfo(), obj_random_bytes(), ole_val2olevariantdata(), ossl_asn1cons_to_der(), ossl_asn1data_to_der(), ossl_buf2str(), ossl_cipher_init(), ossl_EVP_CIPHER_CTX_copy(), ossl_HMAC_CTX_copy(), ossl_pem_passwd_cb(), pack_unpack_internal(), parse_ddd_cb(), parse_mode_enc(), port_str(), pruby_var_to_cstr(), putpair(), r_byte1_buffered(), r_bytes1_buffered(), rb_digest_base_copy(), rb_econv_convert0(), rb_econv_insert_output(), rb_econv_putback(), rb_fiddle_ptr_aset(), rb_file_expand_path_internal(), rb_if_indextoname(), rb_reg_quote(), rb_reg_to_s(), rb_str_casemap(), rb_str_concat(), rb_str_format(), rb_str_init(), rb_str_justify(), rb_str_plus(), rb_str_reverse(), rb_str_sub_bang(), rb_str_times(), rb_strftime_with_timespec(), rb_thread_priority_set(), rb_w32_conv_from_wstr(), rb_w32_fd_copy(), rb_w32_fd_dup(), rb_w32_inet_ntop(), rb_w32_pipe(), rb_w32_system_tmpdir(), read_digits(), RMD160_Finish(), RMD160_Update(), ruby_brace_expand(), ruby_strdup(), s3e(), SHA1_Transform(), SHA1_Update(), sock_s_getnameinfo(), sock_s_unpack_sockaddr_in(), sockopt_bool(), sockopt_int(), sockopt_linger(), splpage(), str_buf_cat(), str_make_independent_expand(), str_new0(), str_new_frozen(), str_replace_shared_without_enc(), str_shared_replace(), strio_unget_bytes(), sym_inspect(), VpAsgn(), w32_cmdvector(), w32_spawn(), w32_wopendir(), w_float(), yaml_document_add_scalar(), yaml_parser_parse_node(), yaml_parser_scan_tag_uri(), yaml_scalar_event_initialize(), yaml_string_join(), yaml_string_read_handler(), and yaml_string_write_handler().

◆ UNLIKELY

#define UNLIKELY (   x)    __builtin_expect((x)!=0,0)

Typedef Documentation

◆ __attribute__

const int ffi_cris_trampoline_closure_offset __attribute__ ( (__mode__(__QI__))  )

Definition at line 110 of file ffi_common.h.

◆ FLOAT32

typedef float FLOAT32

Definition at line 120 of file ffi_common.h.

Function Documentation

◆ alloca()

char* alloca ( )

◆ ffi_prep_cif_machdep()

ffi_status ffi_prep_cif_machdep ( ffi_cif *  cif)

Definition at line 758 of file ffi.c.

References AARCH64_FFI_WITH_V, AARCH64_STACK_ALIGN, aix_adjust_aggregate_sizes(), ALIGN, ASM_NEEDS_REGISTERS, CIF_FLAGS_CHAR, CIF_FLAGS_DINT, CIF_FLAGS_DOUBLE, CIF_FLAGS_FLOAT, CIF_FLAGS_INT, CIF_FLAGS_LDOUBLE, CIF_FLAGS_POINTER, CIF_FLAGS_SHORT, CIF_FLAGS_SINT16, CIF_FLAGS_SINT8, CIF_FLAGS_STRUCT1, CIF_FLAGS_STRUCT2, count, darwin_adjust_aggregate_sizes(), FFI390_RET_DOUBLE, FFI390_RET_FLOAT, FFI390_RET_INT32, FFI390_RET_INT64, FFI390_RET_STRUCT, FFI390_RET_VOID, FFI_ASSERT, FFI_ASSERT_VALID_TYPE, ffi_call_AIX(), ffi_call_ARCompact(), ffi_call_DARWIN(), ffi_call_EABI(), ffi_call_N32(), ffi_call_O32(), ffi_call_pa32(), ffi_call_SYSV(), ffi_call_unix(), ffi_call_win32(), ffi_check_struct_type(), FFI_FLAG_BITS, FFI_HIDDEN, FFI_IA64_TYPE_SMALL_STRUCT, FFI_N32, FFI_N32_SOFT_FLOAT, FFI_N64_SOFT_FLOAT, FFI_O32, FFI_O32_SOFT_FLOAT, ffi_prep_cif_linux64(), ffi_prep_cif_machdep_var(), ffi_prep_cif_sysv(), ffi_size_stack_pa32(), FFI_SIZEOF_ARG, ffi_struct_type(), FFI_SYSV, FFI_TYPE_LONGDOUBLE, FFI_TYPE_MS_STRUCT, FFI_TYPE_SMALL_STRUCT_1B, FFI_TYPE_SMALL_STRUCT_2B, FFI_TYPE_SMALL_STRUCT_4B, FFI_TYPE_SMALLSTRUCT2, FFI_UNIX64, FFI_V9, FFI_VFP, FFIBFIN_RET_BYTE, FFIBFIN_RET_HALFWORD, FFIBFIN_RET_INT32, FFIBFIN_RET_INT64, FFIBFIN_RET_VOID, FLAG_FP_ARGUMENTS, FLAG_RETURNS_128BITS, FLAG_RETURNS_64BITS, FLAG_RETURNS_FP, FLAG_RETURNS_NOTHING, FLAG_RETURNS_STRUCT, FLAG_RETVAL_REFERENCE, ia64_args::gp_regs, hfa_element_type(), hfa_type_size(), if(), is_v_register_candidate(), layout_vfp_args(), LINKAGE_AREA_GPRS, MAX_FPRARGS, MAX_GPRARGS, NFREGARG, NGREGARG, NUM_FPR_ARG_REGISTERS, NUM_GPR_ARG_REGISTERS, offsetof, pass_struct_on_stack(), return_type(), ROUND_SIZE, size, STRUCT_VALUE_ADDRESS_WITH_ARG, and vfp_type_p().

Referenced by ffi_prep_cif_core(), and ffi_prep_cif_machdep_var().

◆ ffi_prep_cif_machdep_var()

ffi_status ffi_prep_cif_machdep_var ( ffi_cif *  cif,
unsigned int  nfixedargs,
unsigned int  ntotalargs 
)