I've personally always been a little perplexed by the istore*
instructions in cranelift and and I also just ran into a bug on #8719 where I broke istore8
for example (I thought it took an 8-bit operand but apparently it takes a 16-64-bit operand). It's well-documented so this was just me missing the docs, but where does this instruction come from? I can't actually find anywhere in Cranelift that generates the instruction...
And perhaps orthogonally is this something that needs to be kept around nowadays? Or can the instructions be removed? (similar questions for uload8/sload8/friends)
I wonder if these are artifacts of the earlier more direct approach to incremental rewriting from Wasm to machine code; they seem to correspond to Wasm's "I only deal in 32 bits but sure I'll load/store a byte for you" instructions
+1 to removing them if we don't use them in cranelift-wasm!
(or rewriting the latter to use extends/truncates if we do!)
I think we had an issue filed to remove them, let me see if I can find it
Yeah that's what I figured their origins were from, but I'm still perplexed why tests broke when I broke the lowerings of the instructions because as far as I can tell nothing actually uses the instructions
oh I lied it's right there in the code translator
I was searching for "istore8" and turns out it's Istore8
in the translator
ok well that explains that
https://github.com/bytecodealliance/wasmtime/issues/6056
Here it is
nice thanks
Last updated: Dec 23 2024 at 13:07 UTC