#define WORD_SIZE sizeof(unsigned int)
#define ARGS_REGISTER_SIZE (WORD_SIZE * 6)
-#define WORD_ALIGN(x) ALIGN(x, WORD_SIZE)
+#define WORD_FFI_ALIGN(x) FFI_ALIGN(x, WORD_SIZE)
/* ffi_prep_args is called by the assembly routine once stack space
has been allocated for the function's arguments */
void** p_argv;
void* stack_args_p = stack;
- p_argv = ecif->avalue;
-
if (ecif == NULL || ecif->cif == NULL) {
return; /* no description to prepare */
}
+ p_argv = ecif->avalue;
+
if ((ecif->cif->rtype != NULL) &&
(ecif->cif->rtype->type == FFI_TYPE_STRUCT))
{
int type = (*p_arg)->type;
void* value = p_argv[i];
char* addr = stack_args_p;
- int aligned_size = WORD_ALIGN(size);
+ int aligned_size = WORD_FFI_ALIGN(size);
/* force word alignment on the stack */
stack_args_p += aligned_size;
avalue[i] = ptr;
break;
}
- ptr += WORD_ALIGN(arg_types[i]->size);
+ ptr += WORD_FFI_ALIGN(arg_types[i]->size);
}
/* set the return type info passed back to the wrapper */