diff options
author | Anthony Green <green@gcc.gnu.org> | 2012-03-04 21:11:09 +0000 |
---|---|---|
committer | Anthony Green <green@gcc.gnu.org> | 2012-03-04 21:11:09 +0000 |
commit | 34fa7690ac66c6d3c5ddb1d35d267836e3c23f3d (patch) | |
tree | 3289bacfc83a97eaf50f42a61d0b9a06f4c76e9c /libffi/src/pa | |
parent | 8b59af5c6af6e67e151b72e48074f58b677b2e42 (diff) | |
download | gcc-34fa7690ac66c6d3c5ddb1d35d267836e3c23f3d.zip gcc-34fa7690ac66c6d3c5ddb1d35d267836e3c23f3d.tar.gz gcc-34fa7690ac66c6d3c5ddb1d35d267836e3c23f3d.tar.bz2 |
Merge upstream libffi
From-SVN: r184897
Diffstat (limited to 'libffi/src/pa')
-rw-r--r-- | libffi/src/pa/ffi.c | 11 | ||||
-rw-r--r-- | libffi/src/pa/ffitarget.h | 18 |
2 files changed, 19 insertions, 10 deletions
diff --git a/libffi/src/pa/ffi.c b/libffi/src/pa/ffi.c index 6d7606f..4ce2bc6 100644 --- a/libffi/src/pa/ffi.c +++ b/libffi/src/pa/ffi.c @@ -1,9 +1,11 @@ /* ----------------------------------------------------------------------- - ffi.c - (c) 2003-2004 Randolph Chung <tausq@debian.org> + ffi.c - (c) 2011 Anthony Green (c) 2008 Red Hat, Inc. - + (c) 2006 Free Software Foundation, Inc. + (c) 2003-2004 Randolph Chung <tausq@debian.org> + HPPA Foreign Function Interface - HP-UX PA ABI support (c) 2006 Free Software Foundation, Inc. + HP-UX PA ABI support Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -633,7 +635,8 @@ ffi_prep_closure_loc (ffi_closure* closure, UINT32 *tmp; #endif - FFI_ASSERT (cif->abi == FFI_PA32); + if (cif->abi != FFI_PA32) + return FFI_BAD_ABI; /* Make a small trampoline that will branch to our handler function. Use PC-relative addressing. */ diff --git a/libffi/src/pa/ffitarget.h b/libffi/src/pa/ffitarget.h index 001f891..5e364d3 100644 --- a/libffi/src/pa/ffitarget.h +++ b/libffi/src/pa/ffitarget.h @@ -1,5 +1,6 @@ /* -----------------------------------------------------------------*-C-*- - ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + ffitarget.h - Copyright (c) 2012 Anthony Green + Copyright (c) 1996-2003 Red Hat, Inc. Target configuration macros for hppa. 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 + /* ---- System specific configurations ----------------------------------- */ #ifndef LIBFFI_ASM @@ -38,21 +43,22 @@ typedef enum ffi_abi { #ifdef PA_LINUX FFI_PA32, - FFI_DEFAULT_ABI = FFI_PA32, + FFI_LAST_ABI, + FFI_DEFAULT_ABI = FFI_PA32 #endif #ifdef PA_HPUX FFI_PA32, - FFI_DEFAULT_ABI = FFI_PA32, + FFI_LAST_ABI, + FFI_DEFAULT_ABI = FFI_PA32 #endif #ifdef PA64_HPUX #error "PA64_HPUX FFI is not yet implemented" FFI_PA64, - FFI_DEFAULT_ABI = FFI_PA64, + FFI_LAST_ABI, + FFI_DEFAULT_ABI = FFI_PA64 #endif - - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 } ffi_abi; #endif |