diff options
author | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-04 21:11:09 +0000 |
---|---|---|
committer | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-04 21:11:09 +0000 |
commit | f51aab02abe223469d9f39e4e46250b65fd18a8b (patch) | |
tree | 3289bacfc83a97eaf50f42a61d0b9a06f4c76e9c /libffi/src/avr32 | |
parent | de3e3c185df5165793e9c0459732eb5c2bede7c5 (diff) | |
download | gcc-f51aab02abe223469d9f39e4e46250b65fd18a8b.tar.gz |
Merge upstream libffi
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184897 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/src/avr32')
-rw-r--r-- | libffi/src/avr32/ffi.c | 6 | ||||
-rw-r--r-- | libffi/src/avr32/ffitarget.h | 11 |
2 files changed, 12 insertions, 5 deletions
diff --git a/libffi/src/avr32/ffi.c b/libffi/src/avr32/ffi.c index 39fba2b03b6..3d43397b03a 100644 --- a/libffi/src/avr32/ffi.c +++ b/libffi/src/avr32/ffi.c @@ -1,5 +1,6 @@ /* ----------------------------------------------------------------------- - ffi.c - Copyright (c) 2009 Bradley Smith <brad@brad-smith.co.uk> + ffi.c - Copyright (c) 2011 Anthony Green + Copyright (c) 2009 Bradley Smith <brad@brad-smith.co.uk> AVR32 Foreign Function Interface @@ -394,7 +395,8 @@ ffi_status ffi_prep_closure_loc(ffi_closure* closure, ffi_cif* cif, void (*fun)(ffi_cif*, void*, void**, void*), void *user_data, void *codeloc) { - FFI_ASSERT(cif->abi == FFI_SYSV); + if (cif->abi != FFI_SYSV) + return FFI_BAD_ABI; unsigned char *__tramp = (unsigned char*)(&closure->tramp[0]); unsigned int __fun = (unsigned int)(&ffi_closure_SYSV); diff --git a/libffi/src/avr32/ffitarget.h b/libffi/src/avr32/ffitarget.h index 1c799b1de72..d0c7586f9a8 100644 --- a/libffi/src/avr32/ffitarget.h +++ b/libffi/src/avr32/ffitarget.h @@ -1,5 +1,6 @@ /* -----------------------------------------------------------------*-C-*- - ffitarget.h - Copyright (c) 2009 Bradley Smith <brad@brad-smith.co.uk> + ffitarget.h - Copyright (c) 2012 Anthony Green + Copyright (c) 2009 Bradley Smith <brad@brad-smith.co.uk> Target configuration macros for AVR32. Permission is hereby granted, free of charge, to any person obtaining @@ -27,6 +28,10 @@ #ifndef LIBFFI_TARGET_H #define LIBFFI_TARGET_H +#ifndef LIBFFI_H +#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." +#endif + #ifndef LIBFFI_ASM typedef unsigned long ffi_arg; typedef signed long ffi_sarg; @@ -34,8 +39,8 @@ typedef signed long ffi_sarg; typedef enum ffi_abi { FFI_FIRST_ABI = 0, FFI_SYSV, - FFI_DEFAULT_ABI = FFI_SYSV, - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + FFI_LAST_ABI, + FFI_DEFAULT_ABI = FFI_SYSV } ffi_abi; #endif |