1#include <sysio/vm/backend.hpp>
18std::vector<uint8_t> max_load_offset_wasm = {
19 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x60,
20 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0x05, 0x03, 0x01, 0x00, 0x01, 0x0a,
21 0x0e, 0x01, 0x0c, 0x00, 0x41, 0x00, 0x28, 0x02, 0xff, 0xff, 0xff, 0xff,
31std::vector<uint8_t> max_store_offset_wasm = {
32 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x60,
33 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0x05, 0x03, 0x01, 0x00, 0x01, 0x0a,
34 0x0f, 0x01, 0x0d, 0x00, 0x41, 0x00, 0x41, 0x00, 0x36, 0x02, 0xff, 0xff,
35 0xff, 0xff, 0x0f, 0x0b
44std::vector<uint8_t> load_offset_2_wasm = {
45 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x60,
46 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0x05, 0x03, 0x01, 0x00, 0x01, 0x0a,
47 0x0a, 0x01, 0x08, 0x00, 0x41, 0x00, 0x28, 0x02, 0x02, 0x1a, 0x0b
56std::vector<uint8_t> store_offset_2_wasm = {
57 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x60,
58 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0x05, 0x03, 0x01, 0x00, 0x01, 0x0a,
59 0x0b, 0x01, 0x09, 0x00, 0x41, 0x00, 0x41, 0x00, 0x36, 0x02, 0x02, 0x0b
62struct empty_options {};
63struct static_options_1 {
64 static constexpr std::uint32_t max_memory_offset = 1;
66struct static_options_2 {
67 static constexpr std::uint32_t max_memory_offset = 2;
69struct dynamic_options {
70 std::uint32_t max_memory_offset;
77 backend_t backend_load_max(max_load_offset_wasm, &
wa);
78 backend_t backend_store_max(max_store_offset_wasm, &
wa);
85 backend_t backend_load_max(max_load_offset_wasm, &
wa);
86 backend_t backend_store_max(max_store_offset_wasm, &
wa);
104 backend_t backend_store_2(store_offset_2_wasm, &
wa);
119 backend_t backend_load_2(load_offset_2_wasm,
nullptr, dynamic_options{2});
120 backend_t backend_store_2(store_offset_2_wasm,
nullptr, dynamic_options{2});
sysio::vm::backend< rhf_t > backend_t
#define CHECK_THROWS_AS(expr, exceptionType)
#define BACKEND_TEST_CASE(name, tags)