diff options
author | Kaz Kojima <kkojima@gcc.gnu.org> | 2012-03-13 22:50:16 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@gcc.gnu.org> | 2012-03-13 22:50:16 +0000 |
commit | 60f9021b2aaaf6beeb05c8abb48ecbad31e0b768 (patch) | |
tree | d9bc825e34f48648ec69abf6928f0e84af830b89 /libffi/src/sh64 | |
parent | 0d23faac63ce40059a91650b0801fa680cc8cb9a (diff) | |
download | gcc-60f9021b2aaaf6beeb05c8abb48ecbad31e0b768.tar.gz |
ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test, just return FFI_BAD_ABI when things are wrong.
* 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.
From-SVN: r185361
Diffstat (limited to 'libffi/src/sh64')
-rw-r--r-- | libffi/src/sh64/ffi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libffi/src/sh64/ffi.c b/libffi/src/sh64/ffi.c index 8fbc05ca6eb..123b87ace92 100644 --- a/libffi/src/sh64/ffi.c +++ b/libffi/src/sh64/ffi.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - 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 @@ -302,7 +302,8 @@ ffi_prep_closure_loc (ffi_closure *closure, { 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 |