Skip to content

Make use of R2..R10 in wasm backend

Currently, Wasm.S reserves R1..R10 as wasm globals, but actually only R1 is used at runtime, the rest goes through the stack. This should be fixed, and sounds like a simple problem that can be fixed by changing MachRegs configuration for wasm32 and bumping MAX_REAL_VANILLA_REGS. But this would unfortunately result in runtime crashes.

I did some preliminary investigation before merging !9204 (closed), the culprit is most likely the auto-generated AutoApply.cmm having some callconv mismatch with the cmm pipeline output. In any case, it's a real shame we can't use R2..R10 and this should be fixed asap, but it'll take quite a bit of time to figure out what really went wrong here.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information