Files
wasmtime/cranelift/codegen
Chris Fallin ed9db962de x64 backend: fix cmpxchg (don't return RealReg as result). (#4243)
The current lowering helper for `cmpxchg` returns the literal RealReg
`rax` as its result. However, this breaks a number of invariants, and
eventually causes a regalloc panic if used as a blockparam arg (pinned
vregs cannot be used in this way).

In general we have to return regular vregs, not a RealReg, as results of
instructions during lowering. However #4223 added a helper for
`x64_cmpxchg` that returns a literal `rax`.

Fortunately we can do the right thing here by just giving a fresh vreg
to the instruction; the regalloc constraints mean that this vreg is
constrained to `rax` at the instruction (at its def/late point), so the
generator of the instruction need not worry about `rax` here.
2022-06-08 06:13:31 -07:00
..
2021-10-10 14:19:08 +02:00
2022-06-06 09:12:47 -05:00
2022-06-06 09:12:47 -05:00
2022-06-06 09:12:47 -05:00

This crate contains the core Cranelift code generator. It translates code from an intermediate representation into executable machine code.