Re: [PATCH 1/2] arm: Fix fenv support
Keith Packard via Newlib <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Sebastian Huber <[email protected]> writes: > The previous fenv support for ARM used the soft-float implementation of > FreeBSD. Newlib uses the one from libgcc by default. They are not > compatible. Having an GCC incompatible soft-float fenv support in > Newlib makes no sense. A long-term solution could be to provide a > libgcc compatible soft-float support. This likely requires changes in > the GCC configuration. For now, provide a stub implementation for > soft-float multilibs similar to RISC-V. Thanks for cleaning this up. One thing I think we're still missing is the setting of math_errhandling. That value is currently set to MATH_ERRNO in math.h, which indicates that the underlying system will set errno, but that it won't raise any exceptions. I think we should figure out when exceptions will be raised and set math_errhandling to match. That can be decided at compile time -- platforms with HW floats and exception support should make math_errhandling include MATH_ERREXCEPT. This does leave me a bit confused about how this should work on a processor with HW float and SW double support though. In that case, operations involving single-precision arithmetic may offer exceptions and rounding mode support while double-precision operations will not. The C99 spec doesn't appear to have any guidance for this case, which means we need to come up with some kind of answer. -- -keith
signature.asc
(application/pgp-signature, 832 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAl8jTv8ACgkQ2yIaaQAA ABHwwBAAoqp9TY4xfP7s2V4iJc5O/GL+DgD2odgYSaqGlWWvWSz2SxJtih9A9AWE RxBKSv82nQ0cgs4ahCBojBJx6tc2tHx5dEFk5Uk/DkodcYHUrgF2ieVGUh+32ti5 R0lfLSBUjIqKoUSIOcMgp9UIUlDGkkqYnuX8EdP+kBHS4R9eHPLzVzH246WTm8fb VI08K+Nsi6Sb5Xa5U4I1E4ItAcXlN5hgAb6t+8rcQ+Hv1p90EQztW9mQjsiRDV91 x0kNaMJn5HLUMnnM64XnYeymwPsAN0YukEy9LyFSb+Kv5QE9l5SHF6DVekH57lAz G9/aA39WrUvrDJGjH7Lq4Tp8GTmo2/njdCT9+7htjCa3QWqt+Vh7dQ/bUpSD5kmw zGKlGNLHy3v1tiDft7XEjK3of/qbv9SttxFjcT2/ghYrrctv/fEIdZ/wWcjOTywX WNHZr1wtmanBAlFeouE3HQJD97ZZSWhKcNe+yw5jxVlk3cA2xHYCbajyPgxJu66e AHQtwMcyvt0TXIEx5zi1mEkmad0FbgX13g3G9hs26klISnKg2K1I1M++y1sENPY4 6h4/tfUNtLRAAzXWssxd1I6eCs5hxbfvkgbumnu48fA/N4O6UaSBiJos4s/KPGvg Z8imJ6rtjb7e67JOx0yoQUhXXYal80kAIEH/g7nExvxNA8QoJys= =r85E -----END PGP SIGNATURE-----