Correct rationale in simd_x86_64.S comment
CI / release (arm64, , ubuntu-latest-arm64) (pull_request) Successful in 2m19s
CI / pre-commit (pull_request) Successful in 1m59s
CI / test (-DCMAKE_BUILD_TYPE=Debug -DMSAN_TOOLCHAIN_PATH=/opt/msan, debug) (pull_request) Successful in 3m47s
CI / test (-DCMAKE_CXX_FLAGS=-DUSE_64_BIT=1, 64-bit-versions) (pull_request) Successful in 3m27s
CI / test (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc) (pull_request) Successful in 3m14s
CI / test (-DUSE_SIMD_FALLBACK=ON, simd-fallback) (pull_request) Successful in 3m16s
CI / release (amd64, -DMSAN_TOOLCHAIN_PATH=/opt/msan, ubuntu-latest-amd64) (pull_request) Failing after 2m14s
CI / coverage (pull_request) Successful in 3m42s

The SIMD operations are written in assembly because loading and
operating on indeterminate values is UB in C++ but well-defined in
assembly. msan not tracking the loads is a side effect, not the reason.
Closes #71
This commit is contained in:
2026-08-02 22:25:16 -04:00
parent b19981ee3c
commit 79ae91e7d3
+4 -3
View File
@@ -1,7 +1,8 @@
// SIMD operations on potentially-indeterminate Node16::index[16] bytes.
// Written in assembly so msan doesn't track the loads. The caller is
// responsible for masking the returned bitfield to [0, numChildren) before
// using it.
// Written in assembly because loading and operating on indeterminate values
// is UB in C++ but well-defined in assembly. (A side effect is that msan
// doesn't track the loads.) The caller is responsible for masking the
// returned bitfield to [0, numChildren) before using it.
//
// All functions return a 16-bit bitmask in %eax (bit i set = condition true
// at index i). The upper 16 bits of %eax are zero.