bjorn3 commented on Issue #1043:
This is fixed with the new backends, right?
cfallin commented on Issue #1043:
Indeed; I think we can go ahead and close this since we've addressed the issue (no longer need to track it); even if the new backend is not yet the default for the codegen crate or in wasmtime, it will be soon enough.
cfallin closed Issue #1043:
Currently, cranelift spills all registers across calls, without regard to whether they're callee-saved.
However the nice thing about callee-saved registers is that they're saved across calls ;-), and Cranelift indeed supports the callee side of this.
At a high level, the steps here are:
- Generalize x86's
callee_saved_gprs
intocallee_saved_regs
and make it not specific to GPRs (this appears needed for saving XMM registers on windows_fastcall too).- Refactor this
callee_saved_regs
from being a private function to being a function in theTargetIsa
trait, so that we can access thecallee_saved_gprs
from other places in the code.- Make the code mentioned above in spilling.rs consult the
TargetIsa
'scallee_saved_regs
set and skip spilling registers in the callee-saved set.
Last updated: Oct 23 2024 at 20:03 UTC