upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/script.cpp
diff options
context:
space:
mode:
authorEric <tilcboy44@gmail.com>2026-07-30 07:35:08 -0600
committerGitHub <noreply@github.com>2026-07-30 10:35:08 -0300
commit6ecd5f75650bc86e3b1ccbdf2999ec31c43f551b (patch)
treece11959c3b87811db7a18b89b31036d34b866544 /src/script.cpp
parent68b11f46fc4d3035292b41ef1dee9ae957e0a0ef (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/script.cpp')
0 files changed, 0 insertions, 0 deletions