summaryrefslogtreecommitdiff
path: root/src/wasm-builder.h
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-09-23 18:15:14 -0700
committerGitHub <noreply@github.com>2019-09-23 18:15:14 -0700
commit835581f58eb5040656243f7345ebcacf6d7deee5 (patch)
treed5f8878015be2edcdf3d69306c0a8bc20ecd9bf6 /src/wasm-builder.h
parentfb217c80c6d9c4b52d90571c435fc52dc868df47 (diff)
downloadbinaryen-835581f58eb5040656243f7345ebcacf6d7deee5.tar.gz
binaryen-835581f58eb5040656243f7345ebcacf6d7deee5.tar.bz2
binaryen-835581f58eb5040656243f7345ebcacf6d7deee5.zip
vNxM.load_splat instructions (#2350)
Introduces a new instruction class, `SIMDLoad`. Implements encoding, decoding, parsing, printing, and interpretation of the load and splat instructions, including in the C and JS APIs. `v128.load` remains in the `Load` instruction class for now because the interpreter code expects a `Load` to be able to load any memory value type.
Diffstat (limited to 'src/wasm-builder.h')
-rw-r--r--src/wasm-builder.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index c2f1e41b6..d47ec413f 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -420,6 +420,16 @@ public:
ret->finalize();
return ret;
}
+ SIMDLoad*
+ makeSIMDLoad(SIMDLoadOp op, Address offset, Address align, Expression* ptr) {
+ auto* ret = allocator.alloc<SIMDLoad>();
+ ret->op = op;
+ ret->offset = offset;
+ ret->align = align;
+ ret->ptr = ptr;
+ ret->finalize();
+ return ret;
+ }
MemoryInit* makeMemoryInit(uint32_t segment,
Expression* dest,
Expression* offset,