pub trait CtzEmitter<T0, T1> {
// Required method
fn ctz(&mut self, rd: T0, rs1: T1);
}Expand description
Count trailing zero bits
This instruction counts the number of 0’s before the first 1, starting at the least-significant bit (i.e., 0) and progressing to the most-significant bit (i.e., XLEN-1). Accordingly, if the input is 0, the output is XLEN, and if the least-significant bit of the input is a 1, the output is 0.
§Forms
Assembly: ctz xd, xs1
Rust: ctz(rd, rs1)
§Arguments
rd— Destination register.rs1— Source register.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".