Add execution to VM via file, starting to iron out bugs

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-02-09 15:43:07 -05:00
parent 00027c4542
commit c982be553f
5 changed files with 93 additions and 16 deletions

View File

@@ -6,6 +6,15 @@ macro_rules! instructions {
$(
pub const $variant: InstOp = $value;
)*
pub fn inst_name(op: InstOp) -> Option<&'static str> {
match op {
$(
$value => Some(stringify!($variant)),
)*
_ => None,
}
}
};
}
pub type InstOp = u16;