A C implementation can be fully-compliant without conforming to ISO/IEC 6055, that's optional; question is just whether that optionality extends to fenv.h too. (at least how far I looked, imo it doesn't, and the pragma…
...I guess you don't use any C compilers targeting x86-64 then? Cause on all the main configurations in my testing (gcc+linux, clang+linux, clang+windows, msvc+windows) x86-64 uses signed char. As such more programs…
That a library exists that claims to do atomics doesn't mean that it actually has working well-defined semantics, and that no standards-compliant C99 compiler can do optimizing transforms that'd break it. Of course no…
Yeah, that's still an issue of course. Root cause is just that gcc utterly doesn't support any of fenv.h. That said, I was surprised that it's mandatory by the standard (and wasn't made optional later like VLAs); feels…
> gcc, however, always defines FLT_ROUNDS to 1 Well, considering that gcc doesn't support the FENV_ACCESS pragma, and as such all fesetround calls are always UB, it is valid for it to act as if the rounding mode never…
Have to be rather careful with such - e.g. an x86 vaddpd or an ARM fadd aren't commutative because of NaN bit patterns (even worse for fma, esp. if you have it automatically choose the operation from which arg it's…
[delayed]
Stop the presses! 5 instructions! vpor xmm2, xmm0, 0x80000000 vpcmpeqd xmm2, xmm1, xmm2 vcmpunordps xmm2, xmm2, xmm0 vminps xmm0, xmm1, xmm0 vblendvps xmm0, xmm0, xmm1, xmm2 yay for superoptimizers
That vminpd+vminpd+vorpd actually does handle signed zero properly! Screws up NaN payloads to the max though. Can be easily extended to canonicalize the NaN with 2 instrs + constant though of course. (which ends up at…
> they're going through the pain of changing the hash function They've already gone through the pain, deciding on it on 2018[0] (and functional & non-experimental 3 years ago per TFA). What's left is just changing the…
Or "--ignore-other-worktrees" for "git switch". This leaves things in a weird state though, as modifying the branch from one of the worktrees will effectively change the ref the other is pointing to, but won't update…
How so? It's replacing multiple enum variants, but just one enum, "enum Value". (also; if anything, the title is implying the exact opposite of "Rust compiler was able to optimize ...", "Replacing a Rust [...] with…
Unless the highly-optimized parts are wrapped by an interface that looks similar to the non-optimized version. In the case of a tagged object in Rust, depending on how well the compiler can wrangle through it, you might…
> That always seemed annoying to me. They couldn't allocate 5 more bits somewhere to let the decompressor autodetect longer window sizes? I believe this is just to prevent the decompressor from arbitrarily blowing up…
Heh, you can kinda think of MTE as ASan except instead of a small range of a guaranteed redzone around heap pointers, it's a massive `2^56 * (random number, ≥0, on average 15)`-byte "redzone" (and some padding up to a…
You can still tell actually - jj writes a change-id in the git commit object header, which remains there as it's pushed around. It's just typically not made visible by regular things. (I wonder what other random garbage…
The things/concepts that those screenshots have that infiniminer (a voxel game made before minecraft) doesn't is... grass, trees, glass. I hate to bring it to you, but minecraft didn't invent those. And it certainly…
That is quite a good bit more evenly-spread (the "..." is 5159 instrs). Wonder what's up with bit 21; if whatever uses it so much is repositionable (and not an aarch64-specific thing), could save like 2KB on x86-64 via…
Some stats on an aarch64 binary of my current main project (1.6MB .text, 6600 symbols as per whatever "nm the-binary | wc -l" includes, from "objdump -d the-binary"): 19546 /tbn?z/ 18029 /tbn?z.*, #0x0/ (but this…
Both clang and gcc do actually generate TBZ/TBNZ for checking a bool: https://godbolt.org/z/K6evhaxGT
Some more: > The spec says that bit must be zero, and yet no encoding uses the space opened up by that bit being one. The spec says "the code points with shamt[5]=1 are designated for custom extensions.", so the space…
Random minor-ish notes: - A big problem with extension detection RISC-V has is that there's no central authority mandating vendors to not overlap things (obviously, given RISC-V being an open standard), so basic…
A C implementation can be fully-compliant without conforming to ISO/IEC 6055, that's optional; question is just whether that optionality extends to fenv.h too. (at least how far I looked, imo it doesn't, and the pragma…
...I guess you don't use any C compilers targeting x86-64 then? Cause on all the main configurations in my testing (gcc+linux, clang+linux, clang+windows, msvc+windows) x86-64 uses signed char. As such more programs…
That a library exists that claims to do atomics doesn't mean that it actually has working well-defined semantics, and that no standards-compliant C99 compiler can do optimizing transforms that'd break it. Of course no…
Yeah, that's still an issue of course. Root cause is just that gcc utterly doesn't support any of fenv.h. That said, I was surprised that it's mandatory by the standard (and wasn't made optional later like VLAs); feels…
> gcc, however, always defines FLT_ROUNDS to 1 Well, considering that gcc doesn't support the FENV_ACCESS pragma, and as such all fesetround calls are always UB, it is valid for it to act as if the rounding mode never…
Have to be rather careful with such - e.g. an x86 vaddpd or an ARM fadd aren't commutative because of NaN bit patterns (even worse for fma, esp. if you have it automatically choose the operation from which arg it's…
[delayed]
Stop the presses! 5 instructions! vpor xmm2, xmm0, 0x80000000 vpcmpeqd xmm2, xmm1, xmm2 vcmpunordps xmm2, xmm2, xmm0 vminps xmm0, xmm1, xmm0 vblendvps xmm0, xmm0, xmm1, xmm2 yay for superoptimizers
[delayed]
That vminpd+vminpd+vorpd actually does handle signed zero properly! Screws up NaN payloads to the max though. Can be easily extended to canonicalize the NaN with 2 instrs + constant though of course. (which ends up at…
> they're going through the pain of changing the hash function They've already gone through the pain, deciding on it on 2018[0] (and functional & non-experimental 3 years ago per TFA). What's left is just changing the…
[delayed]
Or "--ignore-other-worktrees" for "git switch". This leaves things in a weird state though, as modifying the branch from one of the worktrees will effectively change the ref the other is pointing to, but won't update…
How so? It's replacing multiple enum variants, but just one enum, "enum Value". (also; if anything, the title is implying the exact opposite of "Rust compiler was able to optimize ...", "Replacing a Rust [...] with…
Unless the highly-optimized parts are wrapped by an interface that looks similar to the non-optimized version. In the case of a tagged object in Rust, depending on how well the compiler can wrangle through it, you might…
> That always seemed annoying to me. They couldn't allocate 5 more bits somewhere to let the decompressor autodetect longer window sizes? I believe this is just to prevent the decompressor from arbitrarily blowing up…
Heh, you can kinda think of MTE as ASan except instead of a small range of a guaranteed redzone around heap pointers, it's a massive `2^56 * (random number, ≥0, on average 15)`-byte "redzone" (and some padding up to a…
[delayed]
You can still tell actually - jj writes a change-id in the git commit object header, which remains there as it's pushed around. It's just typically not made visible by regular things. (I wonder what other random garbage…
The things/concepts that those screenshots have that infiniminer (a voxel game made before minecraft) doesn't is... grass, trees, glass. I hate to bring it to you, but minecraft didn't invent those. And it certainly…
That is quite a good bit more evenly-spread (the "..." is 5159 instrs). Wonder what's up with bit 21; if whatever uses it so much is repositionable (and not an aarch64-specific thing), could save like 2KB on x86-64 via…
Some stats on an aarch64 binary of my current main project (1.6MB .text, 6600 symbols as per whatever "nm the-binary | wc -l" includes, from "objdump -d the-binary"): 19546 /tbn?z/ 18029 /tbn?z.*, #0x0/ (but this…
Both clang and gcc do actually generate TBZ/TBNZ for checking a bool: https://godbolt.org/z/K6evhaxGT
Some more: > The spec says that bit must be zero, and yet no encoding uses the space opened up by that bit being one. The spec says "the code points with shamt[5]=1 are designated for custom extensions.", so the space…
Random minor-ish notes: - A big problem with extension detection RISC-V has is that there's no central authority mandating vendors to not overlap things (obviously, given RISC-V being an open standard), so basic…