From 835c0960ed216f437053769f372dfbfa80df4098 Mon Sep 17 00:00:00 2001 From: Martin Zeller Date: Wed, 20 Sep 2023 17:10:44 +0200 Subject: [PATCH] Add new instructions --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/instructions.rs | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc0ca5f..5be9b2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -895,9 +895,9 @@ dependencies = [ [[package]] name = "tree-sitter-ic10" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa2f7fd8279ecd5fde20a9ff22f5371536f39c6cb934dcbe94568f8e8c44c87f" +checksum = "c87bb21a1ab035f7e1b401529718cdff1603dea8dde896eb1eef338cefb0ab1d" dependencies = [ "cc", "tree-sitter", diff --git a/Cargo.toml b/Cargo.toml index 596fbab..59e71a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ serde_json = "1.0.94" tokio = {version="1.26.0", features=["full"]} tower-lsp = "0.19.0" tree-sitter = "0.20.9" -tree-sitter-ic10 = "0.2.0" +tree-sitter-ic10 = "0.3.0" [build-dependencies] phf_codegen = "0.11.1" diff --git a/src/instructions.rs b/src/instructions.rs index ab6f4b7..fc593c6 100644 --- a/src/instructions.rs +++ b/src/instructions.rs @@ -146,6 +146,21 @@ pub(crate) const INSTRUCTIONS: phf::Map<&'static str, InstructionSignature> = ph "move" => InstructionSignature(&[REGISTER,VALUE]), "sleep" => InstructionSignature(&[VALUE]), "yield" => InstructionSignature(&[]), + "bnan" => InstructionSignature(&[VALUE, VALUE]), + "brnan" => InstructionSignature(&[VALUE, VALUE]), + "lbn" => InstructionSignature(&[REGISTER, VALUE, VALUE, LOGIC_TYPE, BATCH_MODE]), + "lbns" => InstructionSignature(&[REGISTER, VALUE, VALUE, VALUE, SLOT_LOGIC_TYPE, BATCH_MODE]), + "lbs" => InstructionSignature(&[REGISTER, VALUE, VALUE, SLOT_LOGIC_TYPE, BATCH_MODE]), + "not" => InstructionSignature(&[REGISTER, VALUE]), + "sbn" => InstructionSignature(&[VALUE, VALUE, LOGIC_TYPE, REGISTER]), + "sbs" => InstructionSignature(&[VALUE, VALUE, SLOT_LOGIC_TYPE, REGISTER]), + "sla" => InstructionSignature(&[REGISTER, VALUE, VALUE]), + "sll" => InstructionSignature(&[REGISTER, VALUE, VALUE]), + "sra" => InstructionSignature(&[REGISTER, VALUE, VALUE]), + "srl" => InstructionSignature(&[REGISTER, VALUE, VALUE]), + "snan" => InstructionSignature(&[REGISTER, VALUE]), + "snanz" => InstructionSignature(&[REGISTER, VALUE]), + "ss" => InstructionSignature(&[DEVICE, VALUE, SLOT_LOGIC_TYPE, REGISTER]), }; pub(crate) const LOGIC_TYPES: phf::Set<&'static str> = phf_set! {