Would someone be willing to volunteer to review https://github.com/bytecodealliance/wasmtime/pull/1490?
I'm reviewing it now
Thanks!
oh, arg, you're right, this needs to get expanded after the legalizer. let me think about that a bit
oh lol just wrote the same thing down
to be clear I'm fine with w/e works here
could maybe get by with a "mini interpreter" of global values
and only a small whitelist would be allowed in the prologue
Yeah, that's what I'm thinking too.
Use the GlobalValue to describe where the offset is, and have the backend interpret just enough to emit the code you need.
Does that sound workable?
mk, I'll work on implementing that
shouldn't be too too hard
It took me a while to connect the dots but I already have a Cranelift interpreter in progress over at https://github.com/bytecodealliance/cranelift/pull/1351 that could be used for this. @Alex Crichton, I need to rebase that on some more recent work and address some of Benjamin's comments but I would be interested in figuring out what exactly you need in GlobalValue expressions to make that interpreter work.
Uh, that's the old cranelift PR, now the code is at https://github.com/bytecodealliance/wasmtime/pull/1223
It turns out that we're using "interpret" here in the sense of "recognize". See interpret_gv
in the PR; it's translating to new instructions rather than executing them.
Oh sorry yeah interpret is probably the wrong term
:+1:
Last updated: Nov 22 2024 at 16:03 UTC