From c2746117466c0f86b6977af4202b9d53dddf2c55 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 25 Jul 2023 23:47:51 +0200 Subject: [PATCH] Valider --- hbbytecode/src/gen_valider.rs | 4 +++- hbbytecode/src/lib.rs | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hbbytecode/src/gen_valider.rs b/hbbytecode/src/gen_valider.rs index 42e053f..a1223c1 100644 --- a/hbbytecode/src/gen_valider.rs +++ b/hbbytecode/src/gen_valider.rs @@ -90,7 +90,9 @@ macro_rules! gen_valider { $crate::gen_valider::inst_chk!( rest, $ityn, $($opcode),* ) - )|* => rest, + )|*| $crate::gen_valider::inst_chk!( + rest, bbb, BRC + ) => rest, // The plebs _ => { diff --git a/hbbytecode/src/lib.rs b/hbbytecode/src/lib.rs index 08cb345..4919eba 100644 --- a/hbbytecode/src/lib.rs +++ b/hbbytecode/src/lib.rs @@ -18,6 +18,9 @@ macro_rules! constmod { } /// Invoke macro with bytecode definition format +/// +/// Keep in mind BRC instruction is special-cased and you have to implement +/// it manually. #[macro_export] macro_rules! invoke_with_def { ($macro:path) => {