Branches in branch-free code
Summary
The article examines how 128-bit arithmetic on RV32 is broken into 32-bit steps by compilers, producing branches that can introduce timing side channels. It compares how clang, GCC, Zig, and even the Zicond extension handle branchless code, highlighting portability and security concerns across compiler versions and targets. The piece emphasizes the difficulty of writing portable, secure constant-time code and suggests careful review of compiler behavior and extensions.