Re: Joy of this, Joy of that

Liste des GroupesRevenir à col misc 
Sujet : Re: Joy of this, Joy of that
De : 186283 (at) *nospam* ud0s4.net (186282@ud0s4.net)
Groupes : comp.os.linux.misc
Date : 26. Nov 2024, 04:59:29
Autres entêtes
Organisation : wokiesux
Message-ID : <_YOcnXSM0Is_2tj6nZ2dnZfqnPednZ2d@earthlink.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0
On 11/25/24 4:07 AM, Richard Kettlewell wrote:
"186282@ud0s4.net" <186283@ud0s4.net> writes:
   Note though ... almost NO compu-geeks these days
   know ASM. As such they will not be enlightened
   about 'C' in that fashion. Today's geeks mostly
   start with Python and MIGHT go a little further,
   likely Rust.
>
   Just sayin'
>
   Things changed between 1984 and 2024.
>
   We Old Guys can kinda look at 'C' and see
   the ASM it's going to become. Later gens
   do not.
 It’s a common mental model for C, but it’s not accurate.  The language
spec leaves an awful lot of wiggle room for the generated code to
diverge from the “I can see the assembler” model and compilers take full
advantage of it.
 A simple example, based on a historical Linux kernel vulnerability
(CVE-2009-1897):
      int f(int *xp) {
         int x = *xp;
         if(!xp)
           return 0;
         return x;
     }
 In the “assembler” model it would compile to something like this:
         mov eax,dword ptr [rdi]
        cmp rdi,0
        jne L1
        mov eax,0
     L1:
        ret
 In fact at -O2 the test on xp is optimized out:
         mov eax, dword ptr [rdi]
        ret
 https://godbolt.org/z/caKeTMTxf to play further.
 
   Heh ... much of my 'C' looks like the top example, all
   straight-forward and readable. As I said somewhere, 'C'
   was the neat-o new lang back when I got started in things
   so I strongly trend towards the K&R look and feel even now.
   SO easy to write incomprehensible 'C' !
   I agree that the optimization tech has become VERY good
   these days. That final example shows how tight that
   particular bit CAN be made. How the compiler figures
   that out - NO idea ! Messing with microcontrollers
   can be helpful in teaching how to shrink ASM - ya always
   wanna save a few bytes, a few cycles.
   "Tight memory" means "Only four gigabytes" to the
   Gen-Z/A2 crowd  :-)

Date Sujet#  Auteur
19 Nov 24 * Joy of this, Joy of that806root
20 Nov 24 +* Re: Joy of this, Joy of that4Lawrence D'Oliveiro
20 Nov 24 i`* Re: Joy of this, Joy of that3root
20 Nov 24 i +- Re: Joy of this, Joy of that1Lawrence D'Oliveiro
20 Nov 24 i `- Re: Joy of this, Joy of that1rbowman
20 Nov 24 `* Re: Joy of this, Joy of that801186282@ud0s4.net
20 Nov 24  +* Re: Joy of this, Joy of that193Rich
20 Nov 24  i+- Re: Joy of this, Joy of that1The Natural Philosopher
21 Nov 24  i`* Re: Joy of this, Joy of that191186282@ud0s4.net
21 Nov 24  i +* Re: Joy of this, Joy of that2Lawrence D'Oliveiro
14 Jan 25  i i`- Re: Joy of this, Joy of that1Bozo User
21 Nov 24  i +* Re: Joy of this, Joy of that187The Natural Philosopher
22 Nov 24  i i`* Re: Joy of this, Joy of that186Don_from_AZ
22 Nov 24  i i `* Re: Joy of this, Joy of that185Lawrence D'Oliveiro
23 Nov 24  i i  `* Re: Joy of this, Joy of that184186282@ud0s4.net
23 Nov 24  i i   +* Re: Joy of this, Joy of that5Lawrence D'Oliveiro
24 Nov 24  i i   i`* Re: Joy of this, Joy of that4186282@ud0s4.net
24 Nov 24  i i   i +* Re: Joy of this, Joy of that2Lawrence D'Oliveiro
24 Nov 24  i i   i i`- Re: Joy of this, Joy of that1186282@ud0s4.net
24 Nov 24  i i   i `- Re: Joy of this, Joy of that1rbowman
23 Nov 24  i i   `* Re: Joy of this, Joy of that178The Natural Philosopher
23 Nov 24  i i    +- Re: Joy of this, Joy of that1rbowman
23 Nov 24  i i    +- Re: Joy of this, Joy of that1Lawrence D'Oliveiro
24 Nov 24  i i    +* Re: Joy of this, Joy of that174186282@ud0s4.net
24 Nov 24  i i    i+- Re: Joy of this, Joy of that1rbowman
24 Nov 24  i i    i`* Re: Joy of this, Joy of that172Rich
24 Nov 24  i i    i +* Re: Joy of this, Joy of that168The Natural Philosopher
24 Nov 24  i i    i i+* Re: Joy of this, Joy of that159Rich
24 Nov 24  i i    i ii`* Re: Joy of this, Joy of that158D
25 Nov 24  i i    i ii `* Re: Joy of this, Joy of that157rbowman
25 Nov 24  i i    i ii  `* Re: Joy of this, Joy of that156D
25 Nov 24  i i    i ii   `* Re: Joy of this, Joy of that155The Natural Philosopher
25 Nov 24  i i    i ii    +* Re: Joy of this, Joy of that15D
26 Nov 24  i i    i ii    i`* Re: Joy of this, Joy of that14rbowman
26 Nov 24  i i    i ii    i +- Re: Joy of this, Joy of that1D
26 Nov 24  i i    i ii    i `* Re: Joy of this, Joy of that12Pancho
26 Nov 24  i i    i ii    i  `* Re: Joy of this, Joy of that11Rich
26 Nov 24  i i    i ii    i   +* Re: Joy of this, Joy of that2Chris Ahlstrom
27 Nov 24  i i    i ii    i   i`- Re: Joy of this, Joy of that1Pancho
26 Nov 24  i i    i ii    i   `* Re: Joy of this, Joy of that8rbowman
26 Nov 24  i i    i ii    i    +* Re: Joy of this, Joy of that4D
27 Nov 24  i i    i ii    i    i+- Re: Joy of this, Joy of that1Rich
27 Nov 24  i i    i ii    i    i`* Re: Joy of this, Joy of that2rbowman
27 Nov 24  i i    i ii    i    i `- Re: Joy of this, Joy of that1D
27 Nov 24  i i    i ii    i    `* Re: Joy of this, Joy of that3The Natural Philosopher
27 Nov 24  i i    i ii    i     `* Re: Joy of this, Joy of that2rbowman
28 Nov 24  i i    i ii    i      `- Re: Joy of this, Joy of that1The Natural Philosopher
25 Nov 24  i i    i ii    `* Re: Joy of this, Joy of that139Lawrence D'Oliveiro
27 Nov 24  i i    i ii     `* Re: Joy of this, Joy of that138186282@ud0s4.net
27 Nov 24  i i    i ii      `* Re: Joy of this, Joy of that137Lawrence D'Oliveiro
28 Nov 24  i i    i ii       `* Re: Joy of this, Joy of that136186282@ud0s4.net
28 Nov 24  i i    i ii        +* Re: Joy of this, Joy of that133rbowman
28 Nov 24  i i    i ii        i`* Re: Joy of this, Joy of that132186282@ud0s4.net
28 Nov 24  i i    i ii        i +* Re: Joy of this, Joy of that3rbowman
29 Nov 24  i i    i ii        i i`* Re: Joy of this, Joy of that2186282@ud0s4.net
29 Nov 24  i i    i ii        i i `- Re: Joy of this, Joy of that1rbowman
28 Nov 24  i i    i ii        i `* Re: Joy of this, Joy of that128Lawrence D'Oliveiro
29 Nov 24  i i    i ii        i  `* Re: Joy of this, Joy of that127186282@ud0s4.net
29 Nov 24  i i    i ii        i   +* Re: Joy of this, Joy of that116rbowman
30 Nov 24  i i    i ii        i   i`* Re: Joy of this, Joy of that115186282@ud0s4.net
30 Nov 24  i i    i ii        i   i +- Re: Joy of this, Joy of that1Lawrence D'Oliveiro
30 Nov 24  i i    i ii        i   i `* Re: Joy of this, Joy of that113rbowman
30 Nov 24  i i    i ii        i   i  +* Re: Joy of this, Joy of that2The Natural Philosopher
1 Dec 24  i i    i ii        i   i  i`- Re: Joy of this, Joy of that1Lawrence D'Oliveiro
1 Dec 24  i i    i ii        i   i  `* Re: Joy of this, Joy of that110186282@ud0s4.net
1 Dec 24  i i    i ii        i   i   +* Re: Joy of this, Joy of that5The Natural Philosopher
1 Dec 24  i i    i ii        i   i   i+* Re: Joy of this, Joy of that2Rich
3 Dec 24  i i    i ii        i   i   ii`- Re: Joy of this, Joy of that1186282@ud0s4.net
1 Dec 24  i i    i ii        i   i   i+- Re: Joy of this, Joy of that1D
2 Dec 24  i i    i ii        i   i   i`- Re: Joy of this, Joy of that1186282@ud0s4.net
1 Dec 24  i i    i ii        i   i   +* Re: Joy of this, Joy of that2Lawrence D'Oliveiro
3 Dec 24  i i    i ii        i   i   i`- Re: Joy of this, Joy of that1186282@ud0s4.net
1 Dec 24  i i    i ii        i   i   `* Re: Joy of this, Joy of that102rbowman
3 Dec 24  i i    i ii        i   i    `* Re: Joy of this, Joy of that101186282@ud0s4.net
3 Dec 24  i i    i ii        i   i     +* Re: Joy of this, Joy of that2The Natural Philosopher
3 Dec 24  i i    i ii        i   i     i`- Re: Joy of this, Joy of that1rbowman
3 Dec 24  i i    i ii        i   i     `* Re: Joy of this, Joy of that98rbowman
5 Dec 24  i i    i ii        i   i      `* Re: Joy of this, Joy of that97186282@ud0s4.net
5 Dec 24  i i    i ii        i   i       +* Re: Joy of this, Joy of that92D
6 Dec 24  i i    i ii        i   i       i`* Re: Joy of this, Joy of that91186282@ud0s4.net
6 Dec 24  i i    i ii        i   i       i +* Re: Joy of this, Joy of that37rbowman
6 Dec 24  i i    i ii        i   i       i i+* Re: Joy of this, Joy of that34D
7 Dec 24  i i    i ii        i   i       i ii+* Re: Joy of this, Joy of that2186282@ud0s4.net
7 Dec 24  i i    i ii        i   i       i iii`- Re: Joy of this, Joy of that1D
7 Dec 24  i i    i ii        i   i       i ii+* Re: Joy of this, Joy of that17186282@ud0s4.net
7 Dec 24  i i    i ii        i   i       i iii`* Re: Joy of this, Joy of that16D
7 Dec 24  i i    i ii        i   i       i iii +* Re: Joy of this, Joy of that14Rich
7 Dec 24  i i    i ii        i   i       i iii i`* Re: Joy of this, Joy of that13D
7 Dec 24  i i    i ii        i   i       i iii i `* Re: Joy of this, Joy of that12Rich
7 Dec 24  i i    i ii        i   i       i iii i  +* Re: Joy of this, Joy of that10D
8 Dec 24  i i    i ii        i   i       i iii i  i+* Re: Joy of this, Joy of that7Rich
8 Dec 24  i i    i ii        i   i       i iii i  ii+* Re: Joy of this, Joy of that5rbowman
8 Dec 24  i i    i ii        i   i       i iii i  iii`* Re: Joy of this, Joy of that4Rich
8 Dec 24  i i    i ii        i   i       i iii i  iii +* Re: Joy of this, Joy of that2The Natural Philosopher
9 Dec 24  i i    i ii        i   i       i iii i  iii i`- Re: Joy of this, Joy of that1The Natural Philosopher
8 Dec 24  i i    i ii        i   i       i iii i  iii `- Re: Joy of this, Joy of that1rbowman
8 Dec 24  i i    i ii        i   i       i iii i  ii`- Re: Joy of this, Joy of that1D
8 Dec 24  i i    i ii        i   i       i iii i  i`* Re: Joy of this, Joy of that2Robert Riches
8 Dec 24  i i    i ii        i   i       i iii i  i `- Re: Joy of this, Joy of that1D
7 Dec 24  i i    i ii        i   i       i iii i  `- Re: Joy of this, Joy of that1D
8 Dec 24  i i    i ii        i   i       i iii `- Re: Joy of this, Joy of that1186282@ud0s4.net
7 Dec 24  i i    i ii        i   i       i ii`* Re: Joy of this, Joy of that14D
7 Dec 24  i i    i ii        i   i       i i`* Re: Joy of this, Joy of that2186282@ud0s4.net
6 Dec 24  i i    i ii        i   i       i `* Re: Joy of this, Joy of that53D
5 Dec 24  i i    i ii        i   i       `* Re: Joy of this, Joy of that4Lawrence D'Oliveiro
29 Nov 24  i i    i ii        i   `* Re: Joy of this, Joy of that10Lawrence D'Oliveiro
28 Nov 24  i i    i ii        `* Re: Joy of this, Joy of that2Lawrence D'Oliveiro
25 Nov 24  i i    i i`* Re: Joy of this, Joy of that8vallor
24 Nov 24  i i    i `* Re: Joy of this, Joy of that3D
24 Nov 24  i i    `- Re: Joy of this, Joy of that1Rich
21 Nov 24  i `- Re: Joy of this, Joy of that1Rich
20 Nov 24  +* Re: Joy of this, Joy of that606John Ames
20 Nov 24  `- Re: Joy of this, Joy of that1rbowman

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal