1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
//! RISC-V Instruction Macro module. /// Macro for RISC-V Instructions /// /// Arguments: /// - `name`: Instruction name. /// - `opcode`: Instruction opcode. macro_rules! instruction { ($name:ident, $opcode:expr) => { /// Embive Instruction pub struct $name {} impl $name { /// Instruction Opcode pub const OPCODE: u8 = $opcode; } }; } pub(super) use instruction;