Skip to content

Bit scanning operations in emscripten. #17632

Answered by tlively
ovostrikov asked this question in Q&A
Discussion options

You must be logged in to vote

There's no single instruction that has the same behavior, but you can use __builtin_ctz and __builtin_popcount to emulate it and those should lower to a single Wasm instruction each. Emscripten is a thin wrapper around clang at compile time, so it supports everything normal clang supports.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ovostrikov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants