Helper: load a byte from the given address.
| 115 | |
| 116 | /// Helper: load a byte from the given address. |
| 117 | static uint32_t loadByte(VM::VM &VM, uint32_t Addr) { |
| 118 | std::vector<ValVariant> Params = {Addr}; |
| 119 | std::vector<ValType> ParamTypes = {I32Type}; |
| 120 | auto Res = VM.execute("load8", Params, ParamTypes); |
| 121 | EXPECT_TRUE(Res) << "load8 failed at addr=" << Addr; |
| 122 | return (*Res)[0].first.get<uint32_t>(); |
| 123 | } |
| 124 | |
| 125 | /// Helper: call memory.copy(dst, src, len). |
| 126 | static void memoryCopy(VM::VM &VM, uint32_t Dst, uint32_t Src, uint32_t Len) { |
no test coverage detected