diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2023-12-06 16:15:30 +0100 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2023-12-06 16:15:30 +0100 |
| commit | 0cf77f7347d551437baff6bfb7c5768930c50198 (patch) | |
| tree | 7b8e63f4e326a574ed6b7cc2b7832873225fe9f6 /crates/parser | |
| parent | 7d167c2fadb370a33dd65b387dbab9d053f103a9 (diff) | |
feat: support basic loops, br_if
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/parser')
| -rw-r--r-- | crates/parser/src/conversion.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/parser/src/conversion.rs b/crates/parser/src/conversion.rs index 82ceddd..c80a7fc 100644 --- a/crates/parser/src/conversion.rs +++ b/crates/parser/src/conversion.rs @@ -158,6 +158,10 @@ pub fn process_operators<'a>( GlobalSet { global_index } => Instruction::GlobalSet(global_index), MemorySize { .. } => Instruction::MemorySize, MemoryGrow { .. } => Instruction::MemoryGrow, + I32Const { value } => Instruction::I32Const(value), + I64Const { value } => Instruction::I64Const(value), + F32Const { value } => Instruction::F32Const(f32::from_bits(value.bits())), // TODO: check if this is correct + F64Const { value } => Instruction::F64Const(f64::from_bits(value.bits())), // TODO: check if this is correct I32Load { memarg } => Instruction::I32Load(convert_memarg(memarg)), I64Load { memarg } => Instruction::I64Load(convert_memarg(memarg)), F32Load { memarg } => Instruction::F32Load(convert_memarg(memarg)), |
