diff options
| author | Eric <tilcboy44@gmail.com> | 2026-07-30 07:35:08 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-30 10:35:08 -0300 |
| commit | 6ecd5f75650bc86e3b1ccbdf2999ec31c43f551b (patch) | |
| tree | ce11959c3b87811db7a18b89b31036d34b866544 /src/db.cpp | |
| parent | 68b11f46fc4d3035292b41ef1dee9ae957e0a0ef (diff) | |
sha: restrict the x86 bswap asm to x86 (#41)
ByteReverse(word32) in src/sha.h uses the x86 `bswap` instruction via inline
asm, guarded only by `#if defined(__GNUC__)`. GCC and Clang define __GNUC__ on
every architecture they target, so on aarch64 the guard passes and the
assembler then rejects the instruction:
Error: unknown mnemonic `bswap' -- `bswap %eax'
This makes the tree fail to build on any ARM64 host -- Apple Silicon, ARM
servers, a Raspberry Pi -- at a point far from anything the user did.
Narrow the guard to the architectures where the instruction exists. The
portable C fallback directly below is then used everywhere else; it was
already there and already correct.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/db.cpp')
0 files changed, 0 insertions, 0 deletions