From b1bdbea991e3a898ca13b48ba0e74e84a263edc9 Mon Sep 17 00:00:00 2001 From: Erin Date: Sat, 16 Sep 2023 01:02:14 +0200 Subject: [PATCH] JMP --- hbbytecode/src/gen_valider.rs | 5 +++++ hbbytecode/src/lib.rs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/hbbytecode/src/gen_valider.rs b/hbbytecode/src/gen_valider.rs index d1e078f..e047aa6 100644 --- a/hbbytecode/src/gen_valider.rs +++ b/hbbytecode/src/gen_valider.rs @@ -158,6 +158,11 @@ macro_rules! inst_chk { [$($opcode)|*, _, _, _, _, _, _, _, _, _, $rest @ ..] }; + ($rest:ident, d, $($opcode:ident),*) => { + // D1 D2 D3 D4 D5 D6 D7 D8 + [$($opcode)|*, _, _, _, _, _, _, _, _, $rest @ ..] + }; + ($rest:ident, n, $($opcode:ident),*) => { [$($opcode)|*, $rest @ ..] }; diff --git a/hbbytecode/src/lib.rs b/hbbytecode/src/lib.rs index fe59ee2..6e63b95 100644 --- a/hbbytecode/src/lib.rs +++ b/hbbytecode/src/lib.rs @@ -61,6 +61,8 @@ macro_rules! invoke_with_def { => [NEG, NOT, CP, SWA, NEGF, ITF, FTI], bd(p0: R, p1: I) => [LI], + d(p0: I) + => [JMP], n() => [UN, TX, NOP, ECALL], );