aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix prev_opXavier Del Campo Romero2025-11-122-2/+5
| | | | | | | | Assigning prev_op inside nwp_execute defeated the purpose because this function is meant to start the state machine for the given instruction. In other words, inspecting prev_op would in fact return the current opcode, instead of the previous opcode.
* Add i32_{gt,le}_{s,u}Xavier Del Campo Romero2025-11-126-4/+100
|
* Do not explicitly initialize static variables to zeroXavier Del Campo Romero2025-11-1011-11/+11
| | | | This is redundant according to the C standard.
* Add current_memory and grow_memory operatorsXavier Del Campo Romero2025-11-104-2/+155
|
* Add if and else operatorsXavier Del Campo Romero2025-11-107-11/+92
|
* Add i32.lt_uXavier Del Campo Romero2025-11-093-1/+25
|
* Add i32.shlXavier Del Campo Romero2025-11-093-1/+25
|
* call_import.c: Always set ci->pcXavier Del Campo Romero2025-11-091-2/+2
| | | | | | Otherwise, imports without parameters would jump to `call` directly without assigning ci->pc first, so that nwp_interp_resume would read incorrectly from offset 0.
* br_if.c: Consider both MSB and LSB for i64Xavier Del Campo Romero2025-11-071-1/+1
| | | | | Otherwise, values such as 0x100000000 (i.e., the 32th-bit is set) would not cause a branch because only the lower 32 bits would be tested.
* set_local.c: Fix set_param to valid nextXavier Del Campo Romero2025-11-071-1/+1
| | | | | | | | | | | set_local is meant to write a local variable, while allowing the use of a caller-defined callback when finished. While this was already correctly implemented by set_local, set_param was incorrectly calling nwp_interp_resume instead of the caller-defined callback. This had the side effect of tee_local not being able to push the value into the stack when the local index referred to a parameter, thus causing undefined behaviour.
* Add i32_store8Xavier Del Campo Romero2025-11-063-1/+92
|
* First commitXavier Del Campo Romero2025-11-06158-0/+10540