On 28/10/2025 08:39, Hermann.Lauer@uni-heidelberg.de wrote:
Hi, On Tue, Oct 28, 2025 at 09:18:38AM +0200, Sicelo wrote:On Mon, Oct 27, 2025 at 11:52:00PM +0000, John Klos wrote:What is the purpose of this? Is it to, perhaps, reduce work? If so, what work would that be, specifically?yes - maintaining all special cases is an effort.
I feel architecture improvements fall into a few categories. Some improvements eliminate a significant source of bullshit. Examples of this would be the move from x87 to sse2 (making floating point far more deterministic) or support for hardware atomics (eliminating the need to simulate atomics using some kind of locking) Some improvements provide more options for the optmiser, but don't really eliminate any bullshit or change the basic codegen. Some improvements are really only useful in special-purpose code written with intrinsics or inline assembler. Most sane projects also maintain a hll fallback for such code to support new architectures and to use as a reference. So lets look at what is actually in "x86-64-v2". (a designation invented by an enterprise linux vendor) CMPXCHG16B - expands the size of "native" atomics to 128 bit LAHF-SAHF - allows loading flags directly into register POPCNT - counts number of bits set to 1 SSE3 - more vector stuff SSE4 - even more vector stuff SSE4_1 - yet more vector stuff SSE4_2 - yet more vector stuff SSSE3 - yet more vector stuff CMPXGNC16B seems the closes to "eliminating a source of BS" but even that seems pretty marginal.