| 1 | /* AltiVec (new) version of setjmp for PowerPC. |
| 2 | Copyright (C) 1995-2024 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. |
| 4 | |
| 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either |
| 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | |
| 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | Lesser General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | |
| 19 | #include <libc-symbols.h> |
| 20 | #include <rtld-global-offsets.h> |
| 21 | #include <shlib-compat.h> |
| 22 | |
| 23 | #if !IS_IN (libc) |
| 24 | /* Build a non-versioned object for rtld-*. */ |
| 25 | # define setjmp_symbol setjmp |
| 26 | # define _setjmp_symbol _setjmp |
| 27 | # define __sigsetjmp_symbol __sigsetjmp |
| 28 | # define __sigjmp_save_symbol __sigjmp_save |
| 29 | # include "setjmp-common.S" |
| 30 | |
| 31 | #else /* IS_IN (libc) */ |
| 32 | /* Build a versioned object for libc. */ |
| 33 | versioned_symbol (libc, __vmxsetjmp, setjmp, GLIBC_2_3_4) |
| 34 | versioned_symbol (libc, __vmx_setjmp, _setjmp, GLIBC_2_3_4) |
| 35 | versioned_symbol (libc, __vmx__sigsetjmp, __sigsetjmp, GLIBC_2_3_4) |
| 36 | # define setjmp_symbol __vmxsetjmp |
| 37 | # define _setjmp_symbol __vmx_setjmp |
| 38 | # define __sigsetjmp_symbol __vmx__sigsetjmp |
| 39 | # define __sigjmp_save_symbol __vmx__sigjmp_save |
| 40 | # include "setjmp-common.S" |
| 41 | strong_alias (__vmxsetjmp, __vmx__setjmp) |
| 42 | strong_alias (__vmx__sigsetjmp, __setjmp) |
| 43 | |
| 44 | # if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4) |
| 45 | # undef setjmp_symbol |
| 46 | # undef _setjmp_symbol |
| 47 | # undef __sigsetjmp_symbol |
| 48 | # undef __sigjmp_save_symbol |
| 49 | # undef JB_SIZE |
| 50 | # define __NO_VMX__ |
| 51 | compat_symbol (libc, __novmxsetjmp, setjmp, GLIBC_2_3) |
| 52 | compat_symbol (libc, __novmx_setjmp,_setjmp, GLIBC_2_3); |
| 53 | compat_symbol (libc, __novmx__sigsetjmp,__sigsetjmp, GLIBC_2_3) |
| 54 | # define setjmp_symbol __novmxsetjmp |
| 55 | # define _setjmp_symbol __novmx_setjmp |
| 56 | # define __sigsetjmp_symbol __novmx__sigsetjmp |
| 57 | # define __sigjmp_save_symbol __novmx__sigjmp_save |
| 58 | # include "setjmp-common.S" |
| 59 | strong_alias (__novmxsetjmp, __novmx__setjmp) |
| 60 | # endif |
| 61 | #endif /* IS_IN (libc) */ |
| 62 | |