INNER CODE UNIT · Rust
set_op_bits
GuildOfWeavers/distaff · src/processor/decoder/mod.rs:303
fn set_op_bits(&mut self, flow_op: FlowOps, user_op: UserOps) {
// op_bits are always populated for the previous step
let step = self.step - 1;
let flow_op = flow_op as u8;
for i in 0..NUM_CF_OP_BITS {
self.cf_op_bits[i][step] = ((flow_op >> i) & 1) as u128;
}
let user_op = user_op as u8;
for i in 0..NUM_LD_OP_BITS {
self.ld_op_bits[i][step] = ((user_op >> i) & 1) as u128;
}
for i in 0..NUM_HD_OP_BITS {
self.hd_op_bits[i][step] = ((user_op >> (i + NUM_LD_OP_BITS)) & 1) as u128;
}