Post
If you're not familiar with these instructions (like me until yesterday 😅) — • popcnt is a Wasm and x86 instruction which counts how many bits are set to 1. • clz (lzcnt on x86) counts the number of leading 0s. Very handy here! 6/x
0 reposts2 likes
Oh and of course…if this kind of madness seems appealing to you, you should definitely check out our book, WebAssembly from the Ground Up. The macroassembler shown above is based on the library we construct in the book.
wasmgroundup.comWebAssembly from the Ground UpA book about WebAssembly — learn Wasm by building a simple compiler in JavaScript.