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.
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.
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.
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/>. */
20 #if defined __NO_FPRS__ && !defined _SOFT_FLOAT
22 # include <fenv_libc.h>
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"));
44 /* These variables were formerly global, so there are compat symbols
45 for global versions as well. */
47 #include <shlib-compat.h>
48 #define SIM_GLOBAL_COMPAT SHLIB_COMPAT (libc, GLIBC_2_3_2, GLIBC_2_19)
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))
60 # define SIM_SET_GLOBAL(GLOBAL_VAR, THREAD_VAR) ((void) 0)
63 extern void __simulate_exceptions (int x
) attribute_hidden
;