Commit aa1049f
committed
feat(runtime): implement F64 instructions and fix CallIndirect LEB128 parsing
- Add comprehensive F64 instruction support in stackless engine:
- Memory operations: F64Const, F64Load, F64Store
- Arithmetic: F64Add, F64Sub, F64Mul, F64Div
- Comparisons: F64Eq, F64Ne, F64Lt, F64Gt, F64Le, F64Ge
- Unary: F64Abs, F64Neg, F64Ceil, F64Floor, F64Trunc, F64Nearest, F64Sqrt
- Binary: F64Min, F64Max, F64Copysign
- Conversions: F64ConvertI32S/U, F64ConvertI64S/U, F64PromoteF32
- Reinterpret: F64ReinterpretI64, I64ReinterpretF64
- Fix CallIndirect instruction parsing to properly read table_idx as LEB128
instead of assuming single byte (was causing instruction stream corruption)
- Disable bump allocator in favor of cabi_realloc for proper dlmalloc headers
(prevents memory corruption when Rust frees allocated strings)
These fixes enable calculator.wasm to correctly compute: 5+3=8, 10-7=3, 6*7=42, 100/4=251 parent 9904250 commit aa1049f
2 files changed
+709
-139
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
| |||
0 commit comments