The ARM book says that the immr field should contain (-count % 64); the existing code was approximating this with (64 - count), which is not correct for a zero count.
This crate contains the core Cranelift code generator. It translates code from an intermediate representation into executable machine code.