This commit is contained in:
Anthony Green
2012-01-23 11:13:18 -05:00
parent f22c38bbd9
commit c365ee7577
108 changed files with 4338 additions and 66818 deletions

View File

@@ -1,8 +1,8 @@
/* -----------------------------------------------------------------------
ffi.c - Copyright (c) 2011 Anthony Green
Copyright (c) 2000 Hewlett Packard Company
Copyright (c) 1998, 2007, 2008 Red Hat, Inc.
ffi.c - Copyright (c) 1998, 2007, 2008, 2012 Red Hat, Inc.
Copyright (c) 2000 Hewlett Packard Company
Copyright (c) 2011 Anthony Green
IA64 Foreign Function Interface
Permission is hereby granted, free of charge, to any person obtaining
@@ -325,13 +325,17 @@ ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
case FFI_TYPE_FLOAT:
if (gpcount < 8 && fpcount < 8)
stf_spill (&stack->fp_regs[fpcount++], *(float *)avalue[i]);
stack->gp_regs[gpcount++] = *(UINT32 *)avalue[i];
{
UINT32 tmp;
memcpy (&tmp, avalue[i], sizeof (UINT32));
stack->gp_regs[gpcount++] = tmp;
}
break;
case FFI_TYPE_DOUBLE:
if (gpcount < 8 && fpcount < 8)
stf_spill (&stack->fp_regs[fpcount++], *(double *)avalue[i]);
stack->gp_regs[gpcount++] = *(UINT64 *)avalue[i];
memcpy (&stack->gp_regs[gpcount++], avalue[i], sizeof (UINT64));
break;
case FFI_TYPE_LONGDOUBLE:

View File

@@ -43,6 +43,7 @@
#ifdef __GNUC__
.abicalls
#endif
.set mips4
.text
.align 2
.globl ffi_call_N32