diff options
author | Wojciech Kosior <kwojtus@protonmail.com> | 2020-09-19 21:22:41 +0200 |
---|---|---|
committer | Wojciech Kosior <kwojtus@protonmail.com> | 2020-09-19 21:22:41 +0200 |
commit | 605ac7f13be9f597d3cf7ab3786b71f5cda8c9fa (patch) | |
tree | b3c7a166f33d9d1ff35cbc1ede202dd89903e81e /tests | |
parent | 780f056e61323a41abcaf0dd53a44f99bcac197c (diff) | |
download | AGH-engineering-thesis-605ac7f13be9f597d3cf7ab3786b71f5cda8c9fa.tar.gz AGH-engineering-thesis-605ac7f13be9f597d3cf7ab3786b71f5cda8c9fa.zip |
initial work towards translating wasm to stack machine (with a provisional bench)
Diffstat (limited to 'tests')
l--------- | tests/stack_machine_wasm_sub/Makefile | 1 | ||||
-rw-r--r-- | tests/stack_machine_wasm_sub/instructions.wat | 9 | ||||
l--------- | tests/stack_machine_wasm_sub/test.v | 1 | ||||
-rw-r--r-- | tests/stack_machine_wasm_sub/words_to_verify.mem | 3 |
4 files changed, 14 insertions, 0 deletions
diff --git a/tests/stack_machine_wasm_sub/Makefile b/tests/stack_machine_wasm_sub/Makefile new file mode 120000 index 0000000..4673ba3 --- /dev/null +++ b/tests/stack_machine_wasm_sub/Makefile @@ -0,0 +1 @@ +../stack_machine_function_call/Makefile
\ No newline at end of file diff --git a/tests/stack_machine_wasm_sub/instructions.wat b/tests/stack_machine_wasm_sub/instructions.wat new file mode 100644 index 0000000..7579a46 --- /dev/null +++ b/tests/stack_machine_wasm_sub/instructions.wat @@ -0,0 +1,9 @@ +(module + (memory 0 2) + (func $sub (param $lhs i32) (param $rhs i32);; (result i32) + i32.const 0x17 + local.get $lhs + local.get $rhs + i32.sub + i32.store offset=0x25 align=2) + (export "main" (func $sub))) diff --git a/tests/stack_machine_wasm_sub/test.v b/tests/stack_machine_wasm_sub/test.v new file mode 120000 index 0000000..f5b6a59 --- /dev/null +++ b/tests/stack_machine_wasm_sub/test.v @@ -0,0 +1 @@ +../stack_machine_store/test.v
\ No newline at end of file diff --git a/tests/stack_machine_wasm_sub/words_to_verify.mem b/tests/stack_machine_wasm_sub/words_to_verify.mem new file mode 100644 index 0000000..bd24e95 --- /dev/null +++ b/tests/stack_machine_wasm_sub/words_to_verify.mem @@ -0,0 +1,3 @@ +// address value + 0FFFFC 23 + 23C 1E // Address is 0x200 + 0x25 + 0x17 |