+2012-03-13 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * src/sh/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
+ just return FFI_BAD_ABI when things are wrong.
+ * src/sh64/ffi.c (ffi_prep_closure_loc): Ditto.
+
2012-03-03 H.J. Lu <hongjiu.lu@intel.com>
* src/x86/ffi64.c (ffi_call): Cast the return value to unsigned
/* -----------------------------------------------------------------------
- ffi.c - Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Kaz Kojima
+ ffi.c - Copyright (c) 2002-2008, 2012 Kaz Kojima
Copyright (c) 2008 Red Hat, Inc.
SuperH Foreign Function Interface
unsigned int *tramp;
unsigned int insn;
- FFI_ASSERT (cif->abi == FFI_GCC_SYSV);
+ if (cif->abi != FFI_SYSV)
+ return FFI_BAD_ABI;
tramp = (unsigned int *) &closure->tramp[0];
/* Set T bit if the function returns a struct pointed with R2. */
/* -----------------------------------------------------------------------
- ffi.c - Copyright (c) 2003, 2004, 2006, 2007 Kaz Kojima
+ ffi.c - Copyright (c) 2003, 2004, 2006, 2007, 2012 Kaz Kojima
Copyright (c) 2008 Anthony Green
SuperH SHmedia Foreign Function Interface
{
unsigned int *tramp;
- FFI_ASSERT (cif->abi == FFI_GCC_SYSV);
+ if (cif->abi != FFI_SYSV)
+ return FFI_BAD_ABI;
tramp = (unsigned int *) &closure->tramp[0];
/* Since ffi_closure is an aligned object, the ffi trampoline is