]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/powerpc/nofpu/soft-supp.h
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / sysdeps / powerpc / nofpu / soft-supp.h
1 /* Internal support stuff for complete soft float.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
3 Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library. If not, see
18 <https://www.gnu.org/licenses/>. */
19
20 #if defined __NO_FPRS__ && !defined _SOFT_FLOAT
21
22 # include <fenv_libc.h>
23
24 #else
25
26 # include <fenv.h>
27
28 typedef union
29 {
30 fenv_t fenv;
31 unsigned int l[2];
32 } fenv_union_t;
33
34 #endif
35
36 extern __thread int __sim_exceptions_thread attribute_tls_model_ie;
37 libc_hidden_tls_proto (__sim_exceptions_thread, tls_model ("initial-exec"));
38 extern __thread int __sim_disabled_exceptions_thread attribute_tls_model_ie;
39 libc_hidden_tls_proto (__sim_disabled_exceptions_thread,
40 tls_model ("initial-exec"));
41 extern __thread int __sim_round_mode_thread attribute_tls_model_ie;
42 libc_hidden_tls_proto (__sim_round_mode_thread, tls_model ("initial-exec"));
43
44 /* These variables were formerly global, so there are compat symbols
45 for global versions as well. */
46
47 #include <shlib-compat.h>
48 #define SIM_GLOBAL_COMPAT SHLIB_COMPAT (libc, GLIBC_2_3_2, GLIBC_2_19)
49 #if SIM_GLOBAL_COMPAT
50 extern int __sim_exceptions_global;
51 libc_hidden_proto (__sim_exceptions_global);
52 extern int __sim_disabled_exceptions_global ;
53 libc_hidden_proto (__sim_disabled_exceptions_global);
54 extern int __sim_round_mode_global;
55 libc_hidden_proto (__sim_round_mode_global);
56 # define SIM_COMPAT_SYMBOL(GLOBAL_NAME, NAME) \
57 compat_symbol (libc, GLOBAL_NAME, NAME, GLIBC_2_3_2)
58 # define SIM_SET_GLOBAL(GLOBAL_VAR, THREAD_VAR) ((GLOBAL_VAR) = (THREAD_VAR))
59 #else
60 # define SIM_SET_GLOBAL(GLOBAL_VAR, THREAD_VAR) ((void) 0)
61 #endif
62
63 extern void __simulate_exceptions (int x) attribute_hidden;