MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / storeByte

Function storeByte

test/meminstance/MemInstanceTest.cpp:109–114  ·  view source on GitHub ↗

Helper: store a byte at the given address.

Source from the content-addressed store, hash-verified

107
108/// Helper: store a byte at the given address.
109static void storeByte(VM::VM &VM, uint32_t Addr, uint32_t Val) {
110 std::vector<ValVariant> Params = {Addr, Val};
111 std::vector<ValType> ParamTypes = {I32Type, I32Type};
112 auto Res = VM.execute("store8", Params, ParamTypes);
113 ASSERT_TRUE(Res) << "store8 failed at addr=" << Addr;
114}
115
116/// Helper: load a byte from the given address.
117static uint32_t loadByte(VM::VM &VM, uint32_t Addr) {

Callers 1

TEST_FFunction · 0.85

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected