summaryrefslogtreecommitdiff
path: root/crates/types
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2024-05-09 22:36:14 +0200
committerHenry Gressmann <mail@henrygressmann.de>2024-05-09 22:36:14 +0200
commit53bb44f45cfda750250e0835425307e3a1d763bc (patch)
tree4085c249714d76b82157c7a888baa2151fe8f190 /crates/types
parent11271a201633d3b07adacd07e407ac8d07e5fce3 (diff)
feat: implement I32StoreLocal & I32LocalGetConstAdd
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/types')
-rw-r--r--crates/types/src/instructions.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/types/src/instructions.rs b/crates/types/src/instructions.rs
index 402cc9a..fc6fba2 100644
--- a/crates/types/src/instructions.rs
+++ b/crates/types/src/instructions.rs
@@ -84,16 +84,14 @@ pub enum Instruction {
// Custom Instructions
BrLabel(LabelAddr),
- // Not implemented yet
// LocalGet + I32Const + I32Add
// One of the most common patterns in the Rust compiler output
- // I32LocalGetConstAdd(LocalAddr, i32),
+ I32LocalGetConstAdd(LocalAddr, i32),
- // Not implemented yet
// LocalGet + I32Const + I32Store => I32LocalGetConstStore + I32Const
// Also common, helps us skip the stack entirely.
// Has to be followed by an I32Const instruction
- // I32StoreLocal { local: LocalAddr, offset: i32, mem_addr: MemAddr },
+ I32StoreLocal { local: LocalAddr, consti32: i32, offset: u32, mem_addr: u8 },
// I64Xor + I64Const + I64RotL
// Commonly used by a few crypto libraries