Re: Calling conventions (particularly 32-bit ARM)

Liste des GroupesRevenir à c arch 
Sujet : Re: Calling conventions (particularly 32-bit ARM)
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.arch
Date : 15. Jan 2025, 00:32:11
Autres entêtes
Organisation : None to speak of
Message-ID : <87r0557z0k.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : Gnus/5.13 (Gnus v5.13)
David Brown <david.brown@hesbynett.no> writes:
[...]
I would say the key flag here is "-fno-math-errno" (which is included
in -ffast-math).  While I personally think most floating point code
could be used just as well with "-ffast-math", and it is certainly
appropriate for my own code, others have significantly different
opinions or experiences.  (That's fair enough.)  That one flag simply
disables setting errno in maths functions that can (reasonably) be
implemented inline as instructions, without affecting the results of
any other floating point operations.
>
But to my mind, this is /not/ a case of the POSIX programmer making
the choice - it is an implementation-specific feature.  A C compiler
might choose to always use errno, or never, or have some other control
of the use of errno.  When you write "POSIX leaves it up to the
programmer", I take that to mean POSIX specifies a function that lets
you change the value of "math_errhandling".  That is quite different
from saying "gcc has a flag that lets you choose".

math_errhandling is specified by ISO C, starting with C99.  POSIX merely
copies and refers to the ISO C requirements.  (POSIX might add some
requirements, but I haven't seen that.)  I suggest that POSIX is
irrelevant to this discussion.

As far as I can tell, there is no POSIX (or ISO C) function that changes
the value of math_errhandling.  In fact, such a function would violate
the ISO C rule that "The value of math_errhandling is constant for the
duration of the program.".

(For my own use, I like the flag - I don't write POSIX code, I have
never had any use for errno, and I want the compiler to generate as
few instructions as it possibly can.)

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

Date Sujet#  Auteur
6 Jan 25 * Calling conventions (particularly 32-bit ARM)81David Brown
6 Jan 25 +* Re: Calling conventions (particularly 32-bit ARM)2Theo
7 Jan 25 i`- Re: Calling conventions (particularly 32-bit ARM)1David Brown
6 Jan 25 +* Re: Calling conventions (particularly 32-bit ARM)8Anton Ertl
6 Jan 25 i+* Re: Calling conventions (particularly 32-bit ARM)6MitchAlsup1
7 Jan 25 ii`* Re: Calling conventions (particularly 32-bit ARM)5David Brown
8 Jan 25 ii `* Re: Calling conventions (particularly 32-bit ARM)4MitchAlsup1
8 Jan 25 ii  +* Re: Calling conventions (particularly 32-bit ARM)2Chris M. Thomasson
8 Jan 25 ii  i`- Re: Calling conventions (particularly 32-bit ARM)1Chris M. Thomasson
8 Jan 25 ii  `- Re: Calling conventions (particularly 32-bit ARM)1MitchAlsup1
7 Jan 25 i`- Re: Calling conventions (particularly 32-bit ARM)1David Brown
6 Jan 25 `* Re: Calling conventions (particularly 32-bit ARM)70MitchAlsup1
7 Jan 25  +* Re: Calling conventions (particularly 32-bit ARM)18Waldek Hebisch
7 Jan 25  i+- Re: Calling conventions (particularly 32-bit ARM)1Lawrence D'Oliveiro
12 Jan 25  i`* Re: Calling conventions (particularly 32-bit ARM)16Stephen Fuld
12 Jan 25  i +- Re: Calling conventions (particularly 32-bit ARM)1MitchAlsup1
13 Jan 25  i +* Re: Calling conventions (particularly 32-bit ARM)11Waldek Hebisch
14 Jan 25  i i`* Re: Calling conventions (particularly 32-bit ARM)10Stephen Fuld
14 Jan 25  i i `* Re: Calling conventions (particularly 32-bit ARM)9Terje Mathisen
14 Jan 25  i i  `* Re: Calling conventions (particularly 32-bit ARM)8Michael S
15 Jan 25  i i   `* Re: Calling conventions (particularly 32-bit ARM)7MitchAlsup1
15 Jan 25  i i    +* Re: Calling conventions (particularly 32-bit ARM)3John Levine
15 Jan 25  i i    i`* Re: Calling conventions (particularly 32-bit ARM)2MitchAlsup1
15 Jan 25  i i    i `- Re: Calling conventions (particularly 32-bit ARM)1John Levine
16 Jan 25  i i    `* Re: Calling conventions (particularly 32-bit ARM)3Waldek Hebisch
16 Jan 25  i i     `* Re: Calling conventions (particularly 32-bit ARM)2MitchAlsup1
16 Jan 25  i i      `- Re: Calling conventions (particularly 32-bit ARM)1Waldek Hebisch
13 Jan 25  i `* Re: Calling conventions (particularly 32-bit ARM)3Thomas Koenig
14 Jan 25  i  `* Re: Calling conventions (particularly 32-bit ARM)2Thomas Koenig
14 Jan 25  i   `- Re: Calling conventions (particularly 32-bit ARM)1MitchAlsup1
7 Jan 25  +* Re: Calling conventions (particularly 32-bit ARM)6George Neuner
8 Jan 25  i+* Re: Calling conventions (particularly 32-bit ARM)3Stefan Monnier
9 Jan 25  ii`* Re: Calling conventions (particularly 32-bit ARM)2Anton Ertl
13 Jan 25  ii `- Re: Calling conventions (particularly 32-bit ARM)1Stefan Monnier
28 Jan 25  i`* Re: Calling conventions (particularly 32-bit ARM)2Tim Rentsch
29 Jan 25  i `- Re: Calling conventions (particularly 32-bit ARM)1George Neuner
8 Jan 25  `* Re: Calling conventions (particularly 32-bit ARM)45Stefan Monnier
8 Jan 25   +- Re: Calling conventions (particularly 32-bit ARM)1MitchAlsup1
8 Jan 25   `* Re: Calling conventions (particularly 32-bit ARM)43Anton Ertl
9 Jan 25    `* Re: Calling conventions (particularly 32-bit ARM)42Stefan Monnier
9 Jan 25     +- Re: Calling conventions (particularly 32-bit ARM)1MitchAlsup1
9 Jan 25     `* Re: Calling conventions (particularly 32-bit ARM)40Anton Ertl
9 Jan 25      +* Re: Calling conventions (particularly 32-bit ARM)2Thomas Koenig
10 Jan 25      i`- Re: Calling conventions (particularly 32-bit ARM)1Anton Ertl
9 Jan 25      +* Re: Calling conventions (particularly 32-bit ARM)4MitchAlsup1
9 Jan 25      i`* Re: Calling conventions (particularly 32-bit ARM)3Thomas Koenig
10 Jan 25      i `* Re: Calling conventions (particularly 32-bit ARM)2MitchAlsup1
10 Jan 25      i  `- Re: Calling conventions (particularly 32-bit ARM)1Thomas Koenig
10 Jan 25      +* Re: Calling conventions (particularly 32-bit ARM)29Waldek Hebisch
10 Jan 25      i`* Re: Calling conventions (particularly 32-bit ARM)28Anton Ertl
10 Jan 25      i +- Re: Calling conventions (particularly 32-bit ARM)1John Levine
13 Jan 25      i `* Re: Calling conventions (particularly 32-bit ARM)26MitchAlsup1
13 Jan 25      i  `* Re: Calling conventions (particularly 32-bit ARM)25Thomas Koenig
13 Jan 25      i   `* Re: Calling conventions (particularly 32-bit ARM)24MitchAlsup1
13 Jan 25      i    +* Re: Calling conventions (particularly 32-bit ARM)22MitchAlsup1
14 Jan 25      i    i+* Re: Calling conventions (particularly 32-bit ARM)17MitchAlsup1
14 Jan 25      i    ii+- Re: Calling conventions (particularly 32-bit ARM)1David Brown
14 Jan 25      i    ii+* Re: Calling conventions (particularly 32-bit ARM)2Michael S
14 Jan 25      i    iii`- Re: Calling conventions (particularly 32-bit ARM)1Anton Ertl
14 Jan 25      i    ii+- Re: Calling conventions (particularly 32-bit ARM)1MitchAlsup1
14 Jan 25      i    ii`* Re: Calling conventions (particularly 32-bit ARM)12Thomas Koenig
14 Jan 25      i    ii +* Re: Calling conventions (particularly 32-bit ARM)7Terje Mathisen
14 Jan 25      i    ii i+- Re: Calling conventions (particularly 32-bit ARM)1MitchAlsup1
14 Jan 25      i    ii i+* Re: Calling conventions (particularly 32-bit ARM)4Thomas Koenig
15 Jan 25      i    ii ii`* Re: Calling conventions (particularly 32-bit ARM)3Keith Thompson
15 Jan 25      i    ii ii +- Re: Calling conventions (particularly 32-bit ARM)1Keith Thompson
15 Jan 25      i    ii ii `- Re: Calling conventions (particularly 32-bit ARM)1Keith Thompson
14 Jan 25      i    ii i`- Re: Calling conventions (particularly 32-bit ARM)1Michael S
14 Jan 25      i    ii +- Re: Calling conventions (particularly 32-bit ARM)1MitchAlsup1
14 Jan 25      i    ii `* Re: Calling conventions (particularly 32-bit ARM)3Thomas Koenig
14 Jan 25      i    ii  `* Re: Calling conventions (particularly 32-bit ARM)2Michael S
15 Jan 25      i    ii   `- Re: Calling conventions (particularly 32-bit ARM)1MitchAlsup1
14 Jan 25      i    i+- Re: Calling conventions (particularly 32-bit ARM)1Thomas Koenig
14 Jan 25      i    i`* Re: Calling conventions (particularly 32-bit ARM)3David Brown
14 Jan 25      i    i `* Re: Calling conventions (particularly 32-bit ARM)2David Brown
15 Jan 25      i    i  `- Re: Calling conventions (particularly 32-bit ARM)1Keith Thompson
14 Jan 25      i    `- Re: Calling conventions (particularly 32-bit ARM)1Keith Thompson
10 Jan 25      `* Re: Calling conventions (particularly 32-bit ARM)4David Brown
10 Jan 25       +* Re: Calling conventions (particularly 32-bit ARM)2Thomas Koenig
12 Jan 25       i`- Re: Calling conventions (particularly 32-bit ARM)1David Brown
12 Jan 25       `- Re: Calling conventions (particularly 32-bit ARM)1David Brown

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal