If the scratch register is caller-saved, then it might appear in fixed ranges because of call clobbers. Instead, use a register that's not caller-saved and has no predefined use in the ABI.
This crate contains the core Cranelift code generator. It translates code from an intermediate representation into executable machine code.