Re:Do Not Taunt Happy Fun Branch Predictor
by junon on Thursday January 26, 2023 @05:15AM
(#34529884)
Not sure what your point is. There are no instruction-level parts to the standard. The C standard doesn't dictate how individual CPUs should operate.
[ Parent
| on HN ]
Re:Do Not Taunt Happy Fun Branch Predictor
by tsimionescu on Thursday January 26, 2023 @01:13PM
(#34535989)
The point is that C is very far away from being a "portable assembly" for any kind of modern processor. For the PDP-11 and other processors from that era, there was indeed some pretty simple 1:1 mapping between C instructions and their assembly. This has not been true for decades.
Re:Do Not Taunt Happy Fun Branch Predictor
by MereInterest on Thursday January 26, 2023 @02:01PM
(#34536933)
The point is in reference to flohofwoe's earlier comment which stated "it's still fairly straightforward to map C statements to CPU instructions.". By pointing out the existence of vectorized instructions, which are entirely absent from the C standard, pjmlp was making an argument by counter-example. That while you can map C statements to CPU instructions, most compilers typically don't apply such a 1-1 mapping.
The seeming non-sequitur referring to the ISO C standard was because flohofwoe responded to the rhetorical question as if it were a normal question, leading pjmlp to restate the rhetorical question in a stronger form.