aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLuuk de Gram <luuk@degram.dev>2022-04-02 17:34:24 +0200
committerLuuk de Gram <luuk@degram.dev>2022-04-02 21:54:01 +0200
commitbd27fe2bf58d72dd0cdef73dd4040f2747215b78 (patch)
tree1eb058d93436940069ae6bf578207b3c1b1d7f67 /lib
parent5ba03369ee11b6b57dcad99ab7ed8ce3b08c7456 (diff)
downloadzig-bd27fe2bf58d72dd0cdef73dd4040f2747215b78.tar.gz
zig-bd27fe2bf58d72dd0cdef73dd4040f2747215b78.zip
wasm: Implement `@clz`
Implements the `clz` AIR instruction for integers with bitsize <= 64. When the bitsize of the integer is not the same as wasm's bitsize, we substract the difference in bits as those will always be 0 for the integer, but should not be counted towards the end result. We also wrap the result to ensure it fits in the result type as documented in the language reference.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions