Skip to main content

make_instructions

Function make_instructions 

Source
pub fn make_instructions(op: Opcode, operands: &[usize]) -> Instructions
Expand description

§Panics

If an operand does not fit its opcode’s fixed width. Compiler rejects those with a CompileError before reaching here, so a panic means the caller built the instruction by hand. The alternative — truncating with as u8 / as u16 — is a silent miscompile, so this is checked in release too rather than left to debug_assert!.