Skip to content

Conversation

@solidpixel
Copy link
Contributor

This PR replaces the previous implementation of clz32 in the reference softfloat library, which had multiple paths and compiler-specific intrinsics or inline assembly for some architectures, with a simpler idiomatic pure C implementation.

Modern compilers recognize this implementation and will optimize into a native CLZ instruction on most architectures. Tested on Clang 18 and GCC 16 for AArch64 and x86-64.

@ARM-software ARM-software deleted a comment from Dreamer1 Sep 3, 2025
@solidpixel solidpixel merged commit 7015039 into main Sep 3, 2025
9 checks passed
@solidpixel solidpixel deleted the clz branch September 3, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants