pub fn encode(inst: &str, reserved_only: bool) -> Result<Option<u32>, Error>
Expand description

Convert one RISC-V Vector Extension(RVV) instruction into code.

This function try to parse the instruction as normal asm instruction or standalone label (“1:”/“label:”). If it’s a valid RVV instruction, it will try to encode it to target code. Otherwise, if it’s a valid asm instruction it will return Ok(None). If parse or encode failed, it will return error.