Lines Matching refs:ty

248 get_homogeneous_type (ffi_type *ty)  in get_homogeneous_type()  argument
250 if (ty->type == FFI_TYPE_STRUCT && ty->elements) in get_homogeneous_type()
254 = get_homogeneous_type (ty->elements[0]); in get_homogeneous_type()
255 for (i =1; ty->elements[i]; i++) in get_homogeneous_type()
261 if (ty->elements[i]->type == FFI_TYPE_STRUCT in get_homogeneous_type()
262 && ty->elements[i]->elements) in get_homogeneous_type()
264 iteration_type = get_homogeneous_type (ty->elements[i]); in get_homogeneous_type()
268 iteration_type = ty->elements[i]->type; in get_homogeneous_type()
280 return ty->type; in get_homogeneous_type()
290 element_count (ffi_type *ty) in element_count() argument
292 if (ty->type == FFI_TYPE_STRUCT && ty->elements) in element_count()
296 for (n = 0; ty->elements[n]; n++) in element_count()
298 if (ty->elements[n]->type == FFI_TYPE_STRUCT in element_count()
299 && ty->elements[n]->elements) in element_count()
300 elems += element_count (ty->elements[n]); in element_count()
317 is_hfa (ffi_type *ty) in is_hfa() argument
319 if (ty->type == FFI_TYPE_STRUCT in is_hfa()
320 && ty->elements[0] in is_hfa()
321 && is_floating_type (get_homogeneous_type (ty))) in is_hfa()
323 unsigned n = element_count (ty); in is_hfa()
342 is_register_candidate (ffi_type *ty) in is_register_candidate() argument
344 switch (ty->type) in is_register_candidate()
365 if (is_hfa (ty)) in is_register_candidate()
369 else if (ty->size > 16) in is_register_candidate()
381 return (ty->size + 7) / 8 < N_X_ARG_REG; in is_register_candidate()
397 is_v_register_candidate (ffi_type *ty) in is_v_register_candidate() argument
399 return is_floating_type (ty->type) in is_v_register_candidate()
400 || (ty->type == FFI_TYPE_STRUCT && is_hfa (ty)); in is_v_register_candidate()
557 ffi_type *ty, in copy_hfa_to_reg_or_stack() argument
562 unsigned elems = element_count (ty); in copy_hfa_to_reg_or_stack()
569 memcpy (allocate_to_stack (state, stack, ty->alignment, ty->size), in copy_hfa_to_reg_or_stack()
571 ty->size); in copy_hfa_to_reg_or_stack()
576 unsigned short type = get_homogeneous_type (ty); in copy_hfa_to_reg_or_stack()
668 ffi_type *ty = ecif->cif->arg_types[i]; in aarch64_prep_args() local
669 switch (ty->type) in aarch64_prep_args()
693 ecif->avalue[i], ty->type); in aarch64_prep_args()
697 if (is_hfa (ty)) in aarch64_prep_args()
699 copy_hfa_to_reg_or_stack (ecif->avalue[i], ty, context, in aarch64_prep_args()
702 else if (ty->size > 16) in aarch64_prep_args()
711 else if (available_x (&state) >= (ty->size + 7) / 8) in aarch64_prep_args()
718 for (j = 0; j < (ty->size + 7) / 8; j++) in aarch64_prep_args()
733 memcpy (allocate_to_stack (&state, stack, ty->alignment, in aarch64_prep_args()
734 ty->size), ecif->avalue + i, ty->size); in aarch64_prep_args()
977 ffi_type *ty = cif->arg_types[i]; in ffi_closure_SYSV_inner() local
979 switch (ty->type) in ffi_closure_SYSV_inner()
1000 &state, ty->type); in ffi_closure_SYSV_inner()
1005 if (is_hfa (ty)) in ffi_closure_SYSV_inner()
1007 unsigned n = element_count (ty); in ffi_closure_SYSV_inner()
1011 avalue[i] = allocate_to_stack (&state, stack, ty->alignment, in ffi_closure_SYSV_inner()
1012 ty->size); in ffi_closure_SYSV_inner()
1016 switch (get_homogeneous_type (ty)) in ffi_closure_SYSV_inner()
1031 UINT32 *p = avalue[i] = alloca (ty->size); in ffi_closure_SYSV_inner()
1032 for (j = 0; j < element_count (ty); j++) in ffi_closure_SYSV_inner()
1052 UINT64 *p = avalue[i] = alloca (ty->size); in ffi_closure_SYSV_inner()
1053 for (j = 0; j < element_count (ty); j++) in ffi_closure_SYSV_inner()
1074 else if (ty->size > 16) in ffi_closure_SYSV_inner()
1083 else if (available_x (&state) >= (ty->size + 7) / 8) in ffi_closure_SYSV_inner()
1086 state.ngrn += (ty->size + 7) / 8; in ffi_closure_SYSV_inner()
1092 avalue[i] = allocate_to_stack (&state, stack, ty->alignment, in ffi_closure_SYSV_inner()
1093 ty->size); in ffi_closure_SYSV_inner()