INNER CODE UNIT · Rust

decode_op

GuildOfWeavers/distaff · src/processor/decoder/mod.rs:232

    pub fn decode_op(&mut self, op_code: UserOps, op_value: u128) {
        
        // op_value can be provided only for a PUSH operation and only
        // at steps which are multiples of 8
        if op_value != field::ZERO {
            match op_code {
                UserOps::Push => assert!(self.step % PUSH_OP_ALIGNMENT == 0,
                        "invalid PUSH operation alignment at step {}", self.step),
                _ => panic!("invalid {:?} operation at step {}: op_value is non-zero", op_code, self.step),
            }
        }

        self.advance_step(true);
        self.copy_context_stack();
        self.copy_loop_stack();
        self.set_op_bits(FlowOps::Hacc, op_code);
        self.apply_hacc_round(op_code, op_value);
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…