summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/binaryen.js/kitchen-sink.js6
-rw-r--r--test/binaryen.js/kitchen-sink.js.txt527
-rw-r--r--test/example/c-api-kitchen-sink.c24
-rw-r--r--test/example/c-api-kitchen-sink.txt315
-rw-r--r--test/example/c-api-kitchen-sink.txt.txt30
-rw-r--r--test/simd.wast50
-rw-r--r--test/simd.wast.from-wast74
-rw-r--r--test/simd.wast.fromBinary74
-rw-r--r--test/simd.wast.fromBinary.noDebugInfo74
-rw-r--r--test/spec/simd.wast13
10 files changed, 833 insertions, 354 deletions
diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js
index 4cdfaf2a3..23c50b87f 100644
--- a/test/binaryen.js/kitchen-sink.js
+++ b/test/binaryen.js/kitchen-sink.js
@@ -386,6 +386,12 @@ function test_core() {
module.v16x8.load_splat(16, 1, module.i32.const(128)),
module.v32x4.load_splat(16, 4, module.i32.const(128)),
module.v64x2.load_splat(0, 4, module.i32.const(128)),
+ module.i16x8.load8x8_s(0, 8, module.i32.const(128)),
+ module.i16x8.load8x8_u(0, 8, module.i32.const(128)),
+ module.i32x4.load16x4_s(0, 8, module.i32.const(128)),
+ module.i32x4.load16x4_u(0, 8, module.i32.const(128)),
+ module.i64x2.load32x2_s(0, 8, module.i32.const(128)),
+ module.i64x2.load32x2_u(0, 8, module.i32.const(128)),
// Other SIMD
module.v8x16.shuffle(module.v128.const(v128_bytes), module.v128.const(v128_bytes), v128_bytes),
module.v128.bitselect(module.v128.const(v128_bytes), module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt
index edcfd98b1..ee2b9bf82 100644
--- a/test/binaryen.js/kitchen-sink.js.txt
+++ b/test/binaryen.js/kitchen-sink.js.txt
@@ -1372,6 +1372,36 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5}
)
)
(drop
+ (i16x8.load8x8_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i16x8.load8x8_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_u
+ (i32.const 128)
+ )
+ )
+ (drop
(v8x16.shuffle 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
@@ -2939,6 +2969,36 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5}
)
)
(drop
+ (i16x8.load8x8_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i16x8.load8x8_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_u
+ (i32.const 128)
+ )
+ )
+ (drop
(v8x16.shuffle 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
@@ -5020,233 +5080,245 @@ int main() {
expressions[607] = BinaryenSIMDLoad(the_module, 2, 16, 4, expressions[606]);
expressions[608] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
expressions[609] = BinaryenSIMDLoad(the_module, 3, 0, 4, expressions[608]);
+ expressions[610] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
+ expressions[611] = BinaryenSIMDLoad(the_module, 4, 0, 8, expressions[610]);
+ expressions[612] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
+ expressions[613] = BinaryenSIMDLoad(the_module, 5, 0, 8, expressions[612]);
+ expressions[614] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
+ expressions[615] = BinaryenSIMDLoad(the_module, 6, 0, 8, expressions[614]);
+ expressions[616] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
+ expressions[617] = BinaryenSIMDLoad(the_module, 7, 0, 8, expressions[616]);
+ expressions[618] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
+ expressions[619] = BinaryenSIMDLoad(the_module, 8, 0, 8, expressions[618]);
+ expressions[620] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
+ expressions[621] = BinaryenSIMDLoad(the_module, 9, 0, 8, expressions[620]);
{
uint8_t t223[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[610] = BinaryenConst(the_module, BinaryenLiteralVec128(t223));
+ expressions[622] = BinaryenConst(the_module, BinaryenLiteralVec128(t223));
}
{
uint8_t t224[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[611] = BinaryenConst(the_module, BinaryenLiteralVec128(t224));
+ expressions[623] = BinaryenConst(the_module, BinaryenLiteralVec128(t224));
}
{
uint8_t mask[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[612] = BinaryenSIMDShuffle(the_module, expressions[610], expressions[611], mask);
+ expressions[624] = BinaryenSIMDShuffle(the_module, expressions[622], expressions[623], mask);
}
{
uint8_t t225[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[613] = BinaryenConst(the_module, BinaryenLiteralVec128(t225));
+ expressions[625] = BinaryenConst(the_module, BinaryenLiteralVec128(t225));
}
{
uint8_t t226[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[614] = BinaryenConst(the_module, BinaryenLiteralVec128(t226));
+ expressions[626] = BinaryenConst(the_module, BinaryenLiteralVec128(t226));
}
{
uint8_t t227[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[615] = BinaryenConst(the_module, BinaryenLiteralVec128(t227));
+ expressions[627] = BinaryenConst(the_module, BinaryenLiteralVec128(t227));
}
- expressions[616] = BinaryenSIMDTernary(the_module, 0, expressions[613], expressions[614], expressions[615]);
+ expressions[628] = BinaryenSIMDTernary(the_module, 0, expressions[625], expressions[626], expressions[627]);
{
uint8_t t228[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[617] = BinaryenConst(the_module, BinaryenLiteralVec128(t228));
+ expressions[629] = BinaryenConst(the_module, BinaryenLiteralVec128(t228));
}
{
uint8_t t229[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[618] = BinaryenConst(the_module, BinaryenLiteralVec128(t229));
+ expressions[630] = BinaryenConst(the_module, BinaryenLiteralVec128(t229));
}
{
uint8_t t230[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[619] = BinaryenConst(the_module, BinaryenLiteralVec128(t230));
+ expressions[631] = BinaryenConst(the_module, BinaryenLiteralVec128(t230));
}
- expressions[620] = BinaryenSIMDTernary(the_module, 1, expressions[617], expressions[618], expressions[619]);
+ expressions[632] = BinaryenSIMDTernary(the_module, 1, expressions[629], expressions[630], expressions[631]);
{
uint8_t t231[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[621] = BinaryenConst(the_module, BinaryenLiteralVec128(t231));
+ expressions[633] = BinaryenConst(the_module, BinaryenLiteralVec128(t231));
}
{
uint8_t t232[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[622] = BinaryenConst(the_module, BinaryenLiteralVec128(t232));
+ expressions[634] = BinaryenConst(the_module, BinaryenLiteralVec128(t232));
}
{
uint8_t t233[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[623] = BinaryenConst(the_module, BinaryenLiteralVec128(t233));
+ expressions[635] = BinaryenConst(the_module, BinaryenLiteralVec128(t233));
}
- expressions[624] = BinaryenSIMDTernary(the_module, 2, expressions[621], expressions[622], expressions[623]);
+ expressions[636] = BinaryenSIMDTernary(the_module, 2, expressions[633], expressions[634], expressions[635]);
{
uint8_t t234[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[625] = BinaryenConst(the_module, BinaryenLiteralVec128(t234));
+ expressions[637] = BinaryenConst(the_module, BinaryenLiteralVec128(t234));
}
{
uint8_t t235[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[626] = BinaryenConst(the_module, BinaryenLiteralVec128(t235));
+ expressions[638] = BinaryenConst(the_module, BinaryenLiteralVec128(t235));
}
{
uint8_t t236[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[627] = BinaryenConst(the_module, BinaryenLiteralVec128(t236));
+ expressions[639] = BinaryenConst(the_module, BinaryenLiteralVec128(t236));
}
- expressions[628] = BinaryenSIMDTernary(the_module, 3, expressions[625], expressions[626], expressions[627]);
+ expressions[640] = BinaryenSIMDTernary(the_module, 3, expressions[637], expressions[638], expressions[639]);
{
uint8_t t237[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[629] = BinaryenConst(the_module, BinaryenLiteralVec128(t237));
+ expressions[641] = BinaryenConst(the_module, BinaryenLiteralVec128(t237));
}
{
uint8_t t238[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[630] = BinaryenConst(the_module, BinaryenLiteralVec128(t238));
+ expressions[642] = BinaryenConst(the_module, BinaryenLiteralVec128(t238));
}
{
uint8_t t239[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[631] = BinaryenConst(the_module, BinaryenLiteralVec128(t239));
- }
- expressions[632] = BinaryenSIMDTernary(the_module, 4, expressions[629], expressions[630], expressions[631]);
- expressions[633] = BinaryenConst(the_module, BinaryenLiteralInt32(1024));
- expressions[634] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- expressions[635] = BinaryenConst(the_module, BinaryenLiteralInt32(12));
- expressions[636] = BinaryenMemoryInit(the_module, 0, expressions[633], expressions[634], expressions[635]);
- expressions[637] = BinaryenDataDrop(the_module, 0);
- expressions[638] = BinaryenConst(the_module, BinaryenLiteralInt32(2048));
- expressions[639] = BinaryenConst(the_module, BinaryenLiteralInt32(1024));
- expressions[640] = BinaryenConst(the_module, BinaryenLiteralInt32(12));
- expressions[641] = BinaryenMemoryCopy(the_module, expressions[638], expressions[639], expressions[640]);
- expressions[642] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- expressions[643] = BinaryenConst(the_module, BinaryenLiteralInt32(42));
- expressions[644] = BinaryenConst(the_module, BinaryenLiteralInt32(1024));
- expressions[645] = BinaryenMemoryFill(the_module, expressions[642], expressions[643], expressions[644]);
+ expressions[643] = BinaryenConst(the_module, BinaryenLiteralVec128(t239));
+ }
+ expressions[644] = BinaryenSIMDTernary(the_module, 4, expressions[641], expressions[642], expressions[643]);
+ expressions[645] = BinaryenConst(the_module, BinaryenLiteralInt32(1024));
+ expressions[646] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[647] = BinaryenConst(the_module, BinaryenLiteralInt32(12));
+ expressions[648] = BinaryenMemoryInit(the_module, 0, expressions[645], expressions[646], expressions[647]);
+ expressions[649] = BinaryenDataDrop(the_module, 0);
+ expressions[650] = BinaryenConst(the_module, BinaryenLiteralInt32(2048));
+ expressions[651] = BinaryenConst(the_module, BinaryenLiteralInt32(1024));
+ expressions[652] = BinaryenConst(the_module, BinaryenLiteralInt32(12));
+ expressions[653] = BinaryenMemoryCopy(the_module, expressions[650], expressions[651], expressions[652]);
+ expressions[654] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[655] = BinaryenConst(the_module, BinaryenLiteralInt32(42));
+ expressions[656] = BinaryenConst(the_module, BinaryenLiteralInt32(1024));
+ expressions[657] = BinaryenMemoryFill(the_module, expressions[654], expressions[655], expressions[656]);
{
BinaryenExpressionRef children[] = { 0 };
- expressions[646] = BinaryenBlock(the_module, NULL, children, 0, 0);
- }
- expressions[647] = BinaryenIf(the_module, expressions[7], expressions[8], expressions[9]);
- expressions[648] = BinaryenIf(the_module, expressions[10], expressions[11], expressions[0]);
- expressions[649] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- expressions[650] = BinaryenLoop(the_module, "in", expressions[649]);
- expressions[651] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- expressions[652] = BinaryenLoop(the_module, NULL, expressions[651]);
- expressions[653] = BinaryenBreak(the_module, "the-value", expressions[12], expressions[13]);
- expressions[654] = BinaryenConst(the_module, BinaryenLiteralInt32(2));
- expressions[655] = BinaryenBreak(the_module, "the-nothing", expressions[654], expressions[0]);
- expressions[656] = BinaryenConst(the_module, BinaryenLiteralInt32(3));
- expressions[657] = BinaryenBreak(the_module, "the-value", expressions[0], expressions[656]);
- expressions[658] = BinaryenBreak(the_module, "the-nothing", expressions[0], expressions[0]);
+ expressions[658] = BinaryenBlock(the_module, NULL, children, 0, 0);
+ }
+ expressions[659] = BinaryenIf(the_module, expressions[7], expressions[8], expressions[9]);
+ expressions[660] = BinaryenIf(the_module, expressions[10], expressions[11], expressions[0]);
+ expressions[661] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[662] = BinaryenLoop(the_module, "in", expressions[661]);
+ expressions[663] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[664] = BinaryenLoop(the_module, NULL, expressions[663]);
+ expressions[665] = BinaryenBreak(the_module, "the-value", expressions[12], expressions[13]);
+ expressions[666] = BinaryenConst(the_module, BinaryenLiteralInt32(2));
+ expressions[667] = BinaryenBreak(the_module, "the-nothing", expressions[666], expressions[0]);
+ expressions[668] = BinaryenConst(the_module, BinaryenLiteralInt32(3));
+ expressions[669] = BinaryenBreak(the_module, "the-value", expressions[0], expressions[668]);
+ expressions[670] = BinaryenBreak(the_module, "the-nothing", expressions[0], expressions[0]);
{
const char* names[] = { "the-value" };
- expressions[659] = BinaryenSwitch(the_module, names, 1, "the-value", expressions[14], expressions[15]);
+ expressions[671] = BinaryenSwitch(the_module, names, 1, "the-value", expressions[14], expressions[15]);
}
- expressions[660] = BinaryenConst(the_module, BinaryenLiteralInt32(2));
+ expressions[672] = BinaryenConst(the_module, BinaryenLiteralInt32(2));
{
const char* names[] = { "the-nothing" };
- expressions[661] = BinaryenSwitch(the_module, names, 1, "the-nothing", expressions[660], expressions[0]);
- }
- expressions[662] = BinaryenConst(the_module, BinaryenLiteralInt32(13));
- expressions[663] = BinaryenConst(the_module, BinaryenLiteralInt64(37));
- expressions[664] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3));
- expressions[665] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7));
- {
- BinaryenExpressionRef operands[] = { expressions[662], expressions[663], expressions[664], expressions[665] };
- expressions[666] = BinaryenCall(the_module, "kitchen()sinker", operands, 4, 1);
- }
- expressions[667] = BinaryenUnary(the_module, 20, expressions[666]);
- expressions[668] = BinaryenConst(the_module, BinaryenLiteralInt32(13));
- expressions[669] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7));
- {
- BinaryenExpressionRef operands[] = { expressions[668], expressions[669] };
- expressions[670] = BinaryenCall(the_module, "an-imported", operands, 2, 3);
+ expressions[673] = BinaryenSwitch(the_module, names, 1, "the-nothing", expressions[672], expressions[0]);
}
- expressions[671] = BinaryenUnary(the_module, 25, expressions[670]);
- expressions[672] = BinaryenUnary(the_module, 20, expressions[671]);
- expressions[673] = BinaryenConst(the_module, BinaryenLiteralInt32(2449));
expressions[674] = BinaryenConst(the_module, BinaryenLiteralInt32(13));
expressions[675] = BinaryenConst(the_module, BinaryenLiteralInt64(37));
expressions[676] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3));
expressions[677] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7));
{
BinaryenExpressionRef operands[] = { expressions[674], expressions[675], expressions[676], expressions[677] };
- expressions[678] = BinaryenCallIndirect(the_module, expressions[673], operands, 4, "iiIfF");
+ expressions[678] = BinaryenCall(the_module, "kitchen()sinker", operands, 4, 1);
}
expressions[679] = BinaryenUnary(the_module, 20, expressions[678]);
- expressions[680] = BinaryenLocalGet(the_module, 0, 1);
- expressions[681] = BinaryenDrop(the_module, expressions[680]);
- expressions[682] = BinaryenConst(the_module, BinaryenLiteralInt32(101));
- expressions[683] = BinaryenLocalSet(the_module, 0, expressions[682]);
- expressions[684] = BinaryenConst(the_module, BinaryenLiteralInt32(102));
- expressions[685] = BinaryenLocalTee(the_module, 0, expressions[684]);
- expressions[686] = BinaryenDrop(the_module, expressions[685]);
- expressions[687] = BinaryenConst(the_module, BinaryenLiteralInt32(1));
- expressions[688] = BinaryenLoad(the_module, 4, 1, 0, 0, 1, expressions[687]);
- expressions[689] = BinaryenConst(the_module, BinaryenLiteralInt32(8));
- expressions[690] = BinaryenLoad(the_module, 2, 1, 2, 1, 2, expressions[689]);
- expressions[691] = BinaryenConst(the_module, BinaryenLiteralInt32(2));
- expressions[692] = BinaryenLoad(the_module, 4, 1, 0, 0, 3, expressions[691]);
- expressions[693] = BinaryenConst(the_module, BinaryenLiteralInt32(9));
- expressions[694] = BinaryenLoad(the_module, 8, 1, 2, 8, 4, expressions[693]);
- expressions[695] = BinaryenStore(the_module, 4, 0, 0, expressions[19], expressions[20], 1);
- expressions[696] = BinaryenStore(the_module, 8, 2, 4, expressions[21], expressions[22], 2);
- expressions[697] = BinaryenSelect(the_module, expressions[16], expressions[17], expressions[18]);
- expressions[698] = BinaryenConst(the_module, BinaryenLiteralInt32(1337));
- expressions[699] = BinaryenReturn(the_module, expressions[698]);
- expressions[700] = BinaryenConst(the_module, BinaryenLiteralInt32(13));
- expressions[701] = BinaryenConst(the_module, BinaryenLiteralInt64(37));
- expressions[702] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3));
- expressions[703] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7));
- {
- BinaryenExpressionRef operands[] = { expressions[700], expressions[701], expressions[702], expressions[703] };
- expressions[704] = BinaryenReturnCall(the_module, "kitchen()sinker", operands, 4, 1);
- }
- expressions[705] = BinaryenConst(the_module, BinaryenLiteralInt32(2449));
- expressions[706] = BinaryenConst(the_module, BinaryenLiteralInt32(13));
- expressions[707] = BinaryenConst(the_module, BinaryenLiteralInt64(37));
- expressions[708] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3));
- expressions[709] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7));
- {
- BinaryenExpressionRef operands[] = { expressions[706], expressions[707], expressions[708], expressions[709] };
- expressions[710] = BinaryenReturnCallIndirect(the_module, expressions[705], operands, 4, "iiIfF");
- }
- expressions[711] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- {
- BinaryenExpressionRef operands[] = { expressions[711] };
- expressions[712] = BinaryenThrow(the_module, "a-event", operands, 1);
- }
- expressions[713] = BinaryenPop(the_module, 7);
- expressions[714] = BinaryenLocalSet(the_module, 5, expressions[713]);
- expressions[715] = BinaryenLocalGet(the_module, 5, 7);
- expressions[716] = BinaryenBrOnExn(the_module, "try-block", "a-event", expressions[715]);
- expressions[717] = BinaryenRethrow(the_module, expressions[716]);
- {
- BinaryenExpressionRef children[] = { expressions[717] };
- expressions[718] = BinaryenBlock(the_module, "try-block", children, 1, 1);
- }
- expressions[719] = BinaryenDrop(the_module, expressions[718]);
- {
- BinaryenExpressionRef children[] = { expressions[714], expressions[719] };
- expressions[720] = BinaryenBlock(the_module, NULL, children, 2, 0);
- }
- expressions[721] = BinaryenTry(the_module, expressions[712], expressions[720]);
- expressions[722] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[680] = BinaryenConst(the_module, BinaryenLiteralInt32(13));
+ expressions[681] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7));
+ {
+ BinaryenExpressionRef operands[] = { expressions[680], expressions[681] };
+ expressions[682] = BinaryenCall(the_module, "an-imported", operands, 2, 3);
+ }
+ expressions[683] = BinaryenUnary(the_module, 25, expressions[682]);
+ expressions[684] = BinaryenUnary(the_module, 20, expressions[683]);
+ expressions[685] = BinaryenConst(the_module, BinaryenLiteralInt32(2449));
+ expressions[686] = BinaryenConst(the_module, BinaryenLiteralInt32(13));
+ expressions[687] = BinaryenConst(the_module, BinaryenLiteralInt64(37));
+ expressions[688] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3));
+ expressions[689] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7));
+ {
+ BinaryenExpressionRef operands[] = { expressions[686], expressions[687], expressions[688], expressions[689] };
+ expressions[690] = BinaryenCallIndirect(the_module, expressions[685], operands, 4, "iiIfF");
+ }
+ expressions[691] = BinaryenUnary(the_module, 20, expressions[690]);
+ expressions[692] = BinaryenLocalGet(the_module, 0, 1);
+ expressions[693] = BinaryenDrop(the_module, expressions[692]);
+ expressions[694] = BinaryenConst(the_module, BinaryenLiteralInt32(101));
+ expressions[695] = BinaryenLocalSet(the_module, 0, expressions[694]);
+ expressions[696] = BinaryenConst(the_module, BinaryenLiteralInt32(102));
+ expressions[697] = BinaryenLocalTee(the_module, 0, expressions[696]);
+ expressions[698] = BinaryenDrop(the_module, expressions[697]);
+ expressions[699] = BinaryenConst(the_module, BinaryenLiteralInt32(1));
+ expressions[700] = BinaryenLoad(the_module, 4, 1, 0, 0, 1, expressions[699]);
+ expressions[701] = BinaryenConst(the_module, BinaryenLiteralInt32(8));
+ expressions[702] = BinaryenLoad(the_module, 2, 1, 2, 1, 2, expressions[701]);
+ expressions[703] = BinaryenConst(the_module, BinaryenLiteralInt32(2));
+ expressions[704] = BinaryenLoad(the_module, 4, 1, 0, 0, 3, expressions[703]);
+ expressions[705] = BinaryenConst(the_module, BinaryenLiteralInt32(9));
+ expressions[706] = BinaryenLoad(the_module, 8, 1, 2, 8, 4, expressions[705]);
+ expressions[707] = BinaryenStore(the_module, 4, 0, 0, expressions[19], expressions[20], 1);
+ expressions[708] = BinaryenStore(the_module, 8, 2, 4, expressions[21], expressions[22], 2);
+ expressions[709] = BinaryenSelect(the_module, expressions[16], expressions[17], expressions[18]);
+ expressions[710] = BinaryenConst(the_module, BinaryenLiteralInt32(1337));
+ expressions[711] = BinaryenReturn(the_module, expressions[710]);
+ expressions[712] = BinaryenConst(the_module, BinaryenLiteralInt32(13));
+ expressions[713] = BinaryenConst(the_module, BinaryenLiteralInt64(37));
+ expressions[714] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3));
+ expressions[715] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7));
+ {
+ BinaryenExpressionRef operands[] = { expressions[712], expressions[713], expressions[714], expressions[715] };
+ expressions[716] = BinaryenReturnCall(the_module, "kitchen()sinker", operands, 4, 1);
+ }
+ expressions[717] = BinaryenConst(the_module, BinaryenLiteralInt32(2449));
+ expressions[718] = BinaryenConst(the_module, BinaryenLiteralInt32(13));
+ expressions[719] = BinaryenConst(the_module, BinaryenLiteralInt64(37));
+ expressions[720] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3));
+ expressions[721] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7));
+ {
+ BinaryenExpressionRef operands[] = { expressions[718], expressions[719], expressions[720], expressions[721] };
+ expressions[722] = BinaryenReturnCallIndirect(the_module, expressions[717], operands, 4, "iiIfF");
+ }
expressions[723] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- expressions[724] = BinaryenAtomicLoad(the_module, 4, 0, 1, expressions[723]);
- expressions[725] = BinaryenAtomicStore(the_module, 4, 0, expressions[722], expressions[724], 1);
- expressions[726] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- expressions[727] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- expressions[728] = BinaryenConst(the_module, BinaryenLiteralInt64(0));
- expressions[729] = BinaryenAtomicWait(the_module, expressions[726], expressions[727], expressions[728], 1);
- expressions[730] = BinaryenDrop(the_module, expressions[729]);
- expressions[731] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- expressions[732] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- expressions[733] = BinaryenAtomicNotify(the_module, expressions[731], expressions[732]);
- expressions[734] = BinaryenDrop(the_module, expressions[733]);
- expressions[735] = BinaryenAtomicFence(the_module);
- expressions[736] = BinaryenPop(the_module, 1);
- expressions[737] = BinaryenPush(the_module, expressions[736]);
- expressions[738] = BinaryenPop(the_module, 2);
- expressions[739] = BinaryenPush(the_module, expressions[738]);
- expressions[740] = BinaryenPop(the_module, 3);
- expressions[741] = BinaryenPush(the_module, expressions[740]);
- expressions[742] = BinaryenPop(the_module, 4);
- expressions[743] = BinaryenPush(the_module, expressions[742]);
- expressions[744] = BinaryenPop(the_module, 5);
- expressions[745] = BinaryenPush(the_module, expressions[744]);
- expressions[746] = BinaryenPop(the_module, 7);
- expressions[747] = BinaryenPush(the_module, expressions[746]);
- expressions[748] = BinaryenNop(the_module);
- expressions[749] = BinaryenUnreachable(the_module);
+ {
+ BinaryenExpressionRef operands[] = { expressions[723] };
+ expressions[724] = BinaryenThrow(the_module, "a-event", operands, 1);
+ }
+ expressions[725] = BinaryenPop(the_module, 7);
+ expressions[726] = BinaryenLocalSet(the_module, 5, expressions[725]);
+ expressions[727] = BinaryenLocalGet(the_module, 5, 7);
+ expressions[728] = BinaryenBrOnExn(the_module, "try-block", "a-event", expressions[727]);
+ expressions[729] = BinaryenRethrow(the_module, expressions[728]);
+ {
+ BinaryenExpressionRef children[] = { expressions[729] };
+ expressions[730] = BinaryenBlock(the_module, "try-block", children, 1, 1);
+ }
+ expressions[731] = BinaryenDrop(the_module, expressions[730]);
+ {
+ BinaryenExpressionRef children[] = { expressions[726], expressions[731] };
+ expressions[732] = BinaryenBlock(the_module, NULL, children, 2, 0);
+ }
+ expressions[733] = BinaryenTry(the_module, expressions[724], expressions[732]);
+ expressions[734] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[735] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[736] = BinaryenAtomicLoad(the_module, 4, 0, 1, expressions[735]);
+ expressions[737] = BinaryenAtomicStore(the_module, 4, 0, expressions[734], expressions[736], 1);
+ expressions[738] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[739] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[740] = BinaryenConst(the_module, BinaryenLiteralInt64(0));
+ expressions[741] = BinaryenAtomicWait(the_module, expressions[738], expressions[739], expressions[740], 1);
+ expressions[742] = BinaryenDrop(the_module, expressions[741]);
+ expressions[743] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[744] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[745] = BinaryenAtomicNotify(the_module, expressions[743], expressions[744]);
+ expressions[746] = BinaryenDrop(the_module, expressions[745]);
+ expressions[747] = BinaryenAtomicFence(the_module);
+ expressions[748] = BinaryenPop(the_module, 1);
+ expressions[749] = BinaryenPush(the_module, expressions[748]);
+ expressions[750] = BinaryenPop(the_module, 2);
+ expressions[751] = BinaryenPush(the_module, expressions[750]);
+ expressions[752] = BinaryenPop(the_module, 3);
+ expressions[753] = BinaryenPush(the_module, expressions[752]);
+ expressions[754] = BinaryenPop(the_module, 4);
+ expressions[755] = BinaryenPush(the_module, expressions[754]);
+ expressions[756] = BinaryenPop(the_module, 5);
+ expressions[757] = BinaryenPush(the_module, expressions[756]);
+ expressions[758] = BinaryenPop(the_module, 7);
+ expressions[759] = BinaryenPush(the_module, expressions[758]);
+ expressions[760] = BinaryenNop(the_module);
+ expressions[761] = BinaryenUnreachable(the_module);
BinaryenExpressionGetId(expressions[30]);
BinaryenExpressionGetType(expressions[30]);
BinaryenUnaryGetOp(expressions[30]);
@@ -5257,26 +5329,26 @@ getExpressionInfo={"id":15,"type":3,"op":6}
(f32.const -33.61199951171875)
)
- expressions[750] = BinaryenConst(the_module, BinaryenLiteralInt32(5));
- BinaryenExpressionGetId(expressions[750]);
- BinaryenExpressionGetType(expressions[750]);
- BinaryenConstGetValueI32(expressions[750]);
+ expressions[762] = BinaryenConst(the_module, BinaryenLiteralInt32(5));
+ BinaryenExpressionGetId(expressions[762]);
+ BinaryenExpressionGetType(expressions[762]);
+ BinaryenConstGetValueI32(expressions[762]);
getExpressionInfo(i32.const)={"id":14,"type":1,"value":5}
- expressions[751] = BinaryenConst(the_module, BinaryenLiteralInt64(30064771078));
- BinaryenExpressionGetId(expressions[751]);
- BinaryenExpressionGetType(expressions[751]);
- BinaryenConstGetValueI64Low(expressions[751]);
- BinaryenConstGetValueI64High(expressions[751]);
+ expressions[763] = BinaryenConst(the_module, BinaryenLiteralInt64(30064771078));
+ BinaryenExpressionGetId(expressions[763]);
+ BinaryenExpressionGetType(expressions[763]);
+ BinaryenConstGetValueI64Low(expressions[763]);
+ BinaryenConstGetValueI64High(expressions[763]);
getExpressionInfo(i64.const)={"id":14,"type":2,"value":{"low":6,"high":7}}
- expressions[752] = BinaryenConst(the_module, BinaryenLiteralFloat32(8.5));
- BinaryenExpressionGetId(expressions[752]);
- BinaryenExpressionGetType(expressions[752]);
- BinaryenConstGetValueF32(expressions[752]);
+ expressions[764] = BinaryenConst(the_module, BinaryenLiteralFloat32(8.5));
+ BinaryenExpressionGetId(expressions[764]);
+ BinaryenExpressionGetType(expressions[764]);
+ BinaryenConstGetValueF32(expressions[764]);
getExpressionInfo(f32.const)={"id":14,"type":3,"value":8.5}
- expressions[753] = BinaryenConst(the_module, BinaryenLiteralFloat64(9.5));
- BinaryenExpressionGetId(expressions[753]);
- BinaryenExpressionGetType(expressions[753]);
- BinaryenConstGetValueF64(expressions[753]);
+ expressions[765] = BinaryenConst(the_module, BinaryenLiteralFloat64(9.5));
+ BinaryenExpressionGetId(expressions[765]);
+ BinaryenExpressionGetType(expressions[765]);
+ BinaryenConstGetValueF64(expressions[765]);
getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5}
{
BinaryenExpressionRef children[] = { expressions[24], expressions[26], expressions[28], expressions[30], expressions[32],
@@ -5317,33 +5389,34 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5}
expressions[559], expressions[562], expressions[565], expressions[568], expressions[571], expressions[574],
expressions[577], expressions[580], expressions[583], expressions[586], expressions[589], expressions[592],
expressions[595], expressions[598], expressions[601], expressions[603], expressions[605], expressions[607],
- expressions[609], expressions[612], expressions[616], expressions[620], expressions[624], expressions[628],
- expressions[632], expressions[636], expressions[637], expressions[641], expressions[645], expressions[646],
- expressions[647], expressions[648], expressions[650], expressions[652], expressions[653], expressions[655],
- expressions[657], expressions[658], expressions[659], expressions[661], expressions[667], expressions[672],
- expressions[679], expressions[681], expressions[683], expressions[686], expressions[688], expressions[690],
- expressions[692], expressions[694], expressions[695], expressions[696], expressions[697], expressions[699],
- expressions[704], expressions[710], expressions[721], expressions[725], expressions[730], expressions[734],
- expressions[735], expressions[737], expressions[739], expressions[741], expressions[743], expressions[745],
- expressions[747], expressions[748], expressions[749] };
- expressions[754] = BinaryenBlock(the_module, "the-value", children, 278, 0);
+ expressions[609], expressions[611], expressions[613], expressions[615], expressions[617], expressions[619],
+ expressions[621], expressions[624], expressions[628], expressions[632], expressions[636], expressions[640],
+ expressions[644], expressions[648], expressions[649], expressions[653], expressions[657], expressions[658],
+ expressions[659], expressions[660], expressions[662], expressions[664], expressions[665], expressions[667],
+ expressions[669], expressions[670], expressions[671], expressions[673], expressions[679], expressions[684],
+ expressions[691], expressions[693], expressions[695], expressions[698], expressions[700], expressions[702],
+ expressions[704], expressions[706], expressions[707], expressions[708], expressions[709], expressions[711],
+ expressions[716], expressions[722], expressions[733], expressions[737], expressions[742], expressions[746],
+ expressions[747], expressions[749], expressions[751], expressions[753], expressions[755], expressions[757],
+ expressions[759], expressions[760], expressions[761] };
+ expressions[766] = BinaryenBlock(the_module, "the-value", children, 284, 0);
}
- expressions[755] = BinaryenDrop(the_module, expressions[754]);
+ expressions[767] = BinaryenDrop(the_module, expressions[766]);
{
- BinaryenExpressionRef children[] = { expressions[755] };
- expressions[756] = BinaryenBlock(the_module, "the-nothing", children, 1, 0);
+ BinaryenExpressionRef children[] = { expressions[767] };
+ expressions[768] = BinaryenBlock(the_module, "the-nothing", children, 1, 0);
}
- expressions[757] = BinaryenConst(the_module, BinaryenLiteralInt32(42));
+ expressions[769] = BinaryenConst(the_module, BinaryenLiteralInt32(42));
{
- BinaryenExpressionRef children[] = { expressions[756], expressions[757] };
- expressions[758] = BinaryenBlock(the_module, "the-body", children, 2, 0);
+ BinaryenExpressionRef children[] = { expressions[768], expressions[769] };
+ expressions[770] = BinaryenBlock(the_module, "the-body", children, 2, 0);
}
{
BinaryenType varTypes[] = { 1, 7 };
- functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[1], varTypes, 2, expressions[758]);
+ functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[1], varTypes, 2, expressions[770]);
}
- expressions[759] = BinaryenConst(the_module, BinaryenLiteralInt32(1));
- globals[0] = BinaryenAddGlobal(the_module, "a-global", 1, 0, expressions[759]);
+ expressions[771] = BinaryenConst(the_module, BinaryenLiteralInt32(1));
+ globals[0] = BinaryenAddGlobal(the_module, "a-global", 1, 0, expressions[771]);
{
BinaryenType paramTypes[] = { 1, 4 };
functionTypes[2] = BinaryenAddFunctionType(the_module, "fiF", 3, paramTypes, 2);
@@ -5373,13 +5446,13 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5}
const char* funcNames[] = { "kitchen()sinker" };
BinaryenSetFunctionTable(the_module, 1, 4294967295, funcNames, 1);
}
- expressions[760] = BinaryenConst(the_module, BinaryenLiteralInt32(10));
+ expressions[772] = BinaryenConst(the_module, BinaryenLiteralInt32(10));
{
const char segment0[] = { 104, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100 };
const char segment1[] = { 73, 32, 97, 109, 32, 112, 97, 115, 115, 105, 118, 101 };
const char* segments[] = { segment0, segment1 };
int8_t segmentPassive[] = { 0, 1 };
- BinaryenExpressionRef segmentOffsets[] = { expressions[760], expressions[0] };
+ BinaryenExpressionRef segmentOffsets[] = { expressions[772], expressions[0] };
BinaryenIndex segmentSizes[] = { 12, 12 };
BinaryenSetMemory(the_module, 1, 256, "mem", segments, segmentPassive, segmentOffsets, segmentSizes, 2, 1);
}
@@ -5387,10 +5460,10 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5}
BinaryenType paramTypes[] = { 0 };
functionTypes[3] = BinaryenAddFunctionType(the_module, "v", 0, paramTypes, 0);
}
- expressions[761] = BinaryenNop(the_module);
+ expressions[773] = BinaryenNop(the_module);
{
BinaryenType varTypes[] = { 0 };
- functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[3], varTypes, 0, expressions[761]);
+ functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[3], varTypes, 0, expressions[773]);
}
BinaryenSetStart(the_module, functions[1]);
{
@@ -6702,6 +6775,36 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5}
)
)
(drop
+ (i16x8.load8x8_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i16x8.load8x8_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_u
+ (i32.const 128)
+ )
+ )
+ (drop
(v8x16.shuffle 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
@@ -8271,6 +8374,36 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5}
)
)
(drop
+ (i16x8.load8x8_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i16x8.load8x8_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_u
+ (i32.const 128)
+ )
+ )
+ (drop
(v8x16.shuffle 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index a321290f2..689adcae0 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -491,6 +491,30 @@ void test_core() {
module, BinaryenLoadSplatVec32x4(), 16, 4, makeInt32(module, 128)),
BinaryenSIMDLoad(
module, BinaryenLoadSplatVec64x2(), 0, 4, makeInt32(module, 128)),
+ BinaryenSIMDLoad(
+ module, BinaryenLoadExtSVec8x8ToVecI16x8(), 0, 8, makeInt32(module, 128)),
+ BinaryenSIMDLoad(
+ module, BinaryenLoadExtUVec8x8ToVecI16x8(), 0, 8, makeInt32(module, 128)),
+ BinaryenSIMDLoad(module,
+ BinaryenLoadExtSVec16x4ToVecI32x4(),
+ 0,
+ 8,
+ makeInt32(module, 128)),
+ BinaryenSIMDLoad(module,
+ BinaryenLoadExtUVec16x4ToVecI32x4(),
+ 0,
+ 8,
+ makeInt32(module, 128)),
+ BinaryenSIMDLoad(module,
+ BinaryenLoadExtSVec32x2ToVecI64x2(),
+ 0,
+ 8,
+ makeInt32(module, 128)),
+ BinaryenSIMDLoad(module,
+ BinaryenLoadExtUVec32x2ToVecI64x2(),
+ 0,
+ 8,
+ makeInt32(module, 128)),
// Other SIMD
makeSIMDShuffle(module),
makeSIMDTernary(module, BinaryenBitselectVec128()),
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index 417c33077..4848ec3bf 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -1319,6 +1319,36 @@ BinaryenFeatureAll: 511
)
)
(drop
+ (i16x8.load8x8_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i16x8.load8x8_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_u
+ (i32.const 128)
+ )
+ )
+ (drop
(v8x16.shuffle 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
@@ -3433,177 +3463,189 @@ int main() {
expressions[628] = BinaryenSIMDLoad(the_module, 2, 16, 4, expressions[627]);
expressions[629] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
expressions[630] = BinaryenSIMDLoad(the_module, 3, 0, 4, expressions[629]);
+ expressions[631] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
+ expressions[632] = BinaryenSIMDLoad(the_module, 4, 0, 8, expressions[631]);
+ expressions[633] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
+ expressions[634] = BinaryenSIMDLoad(the_module, 5, 0, 8, expressions[633]);
+ expressions[635] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
+ expressions[636] = BinaryenSIMDLoad(the_module, 6, 0, 8, expressions[635]);
+ expressions[637] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
+ expressions[638] = BinaryenSIMDLoad(the_module, 7, 0, 8, expressions[637]);
+ expressions[639] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
+ expressions[640] = BinaryenSIMDLoad(the_module, 8, 0, 8, expressions[639]);
+ expressions[641] = BinaryenConst(the_module, BinaryenLiteralInt32(128));
+ expressions[642] = BinaryenSIMDLoad(the_module, 9, 0, 8, expressions[641]);
{
uint8_t t224[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[631] = BinaryenConst(the_module, BinaryenLiteralVec128(t224));
+ expressions[643] = BinaryenConst(the_module, BinaryenLiteralVec128(t224));
}
{
uint8_t t225[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[632] = BinaryenConst(the_module, BinaryenLiteralVec128(t225));
+ expressions[644] = BinaryenConst(the_module, BinaryenLiteralVec128(t225));
}
{
uint8_t mask[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- expressions[633] = BinaryenSIMDShuffle(the_module, expressions[631], expressions[632], mask);
+ expressions[645] = BinaryenSIMDShuffle(the_module, expressions[643], expressions[644], mask);
}
{
uint8_t t226[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[634] = BinaryenConst(the_module, BinaryenLiteralVec128(t226));
+ expressions[646] = BinaryenConst(the_module, BinaryenLiteralVec128(t226));
}
{
uint8_t t227[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[635] = BinaryenConst(the_module, BinaryenLiteralVec128(t227));
+ expressions[647] = BinaryenConst(the_module, BinaryenLiteralVec128(t227));
}
{
uint8_t t228[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[636] = BinaryenConst(the_module, BinaryenLiteralVec128(t228));
+ expressions[648] = BinaryenConst(the_module, BinaryenLiteralVec128(t228));
}
- expressions[637] = BinaryenSIMDTernary(the_module, 0, expressions[634], expressions[635], expressions[636]);
+ expressions[649] = BinaryenSIMDTernary(the_module, 0, expressions[646], expressions[647], expressions[648]);
{
uint8_t t229[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[638] = BinaryenConst(the_module, BinaryenLiteralVec128(t229));
+ expressions[650] = BinaryenConst(the_module, BinaryenLiteralVec128(t229));
}
{
uint8_t t230[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[639] = BinaryenConst(the_module, BinaryenLiteralVec128(t230));
+ expressions[651] = BinaryenConst(the_module, BinaryenLiteralVec128(t230));
}
{
uint8_t t231[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[640] = BinaryenConst(the_module, BinaryenLiteralVec128(t231));
+ expressions[652] = BinaryenConst(the_module, BinaryenLiteralVec128(t231));
}
- expressions[641] = BinaryenSIMDTernary(the_module, 1, expressions[638], expressions[639], expressions[640]);
+ expressions[653] = BinaryenSIMDTernary(the_module, 1, expressions[650], expressions[651], expressions[652]);
{
uint8_t t232[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[642] = BinaryenConst(the_module, BinaryenLiteralVec128(t232));
+ expressions[654] = BinaryenConst(the_module, BinaryenLiteralVec128(t232));
}
{
uint8_t t233[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[643] = BinaryenConst(the_module, BinaryenLiteralVec128(t233));
+ expressions[655] = BinaryenConst(the_module, BinaryenLiteralVec128(t233));
}
{
uint8_t t234[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[644] = BinaryenConst(the_module, BinaryenLiteralVec128(t234));
+ expressions[656] = BinaryenConst(the_module, BinaryenLiteralVec128(t234));
}
- expressions[645] = BinaryenSIMDTernary(the_module, 2, expressions[642], expressions[643], expressions[644]);
+ expressions[657] = BinaryenSIMDTernary(the_module, 2, expressions[654], expressions[655], expressions[656]);
{
uint8_t t235[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[646] = BinaryenConst(the_module, BinaryenLiteralVec128(t235));
+ expressions[658] = BinaryenConst(the_module, BinaryenLiteralVec128(t235));
}
{
uint8_t t236[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[647] = BinaryenConst(the_module, BinaryenLiteralVec128(t236));
+ expressions[659] = BinaryenConst(the_module, BinaryenLiteralVec128(t236));
}
{
uint8_t t237[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[648] = BinaryenConst(the_module, BinaryenLiteralVec128(t237));
+ expressions[660] = BinaryenConst(the_module, BinaryenLiteralVec128(t237));
}
- expressions[649] = BinaryenSIMDTernary(the_module, 3, expressions[646], expressions[647], expressions[648]);
+ expressions[661] = BinaryenSIMDTernary(the_module, 3, expressions[658], expressions[659], expressions[660]);
{
uint8_t t238[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[650] = BinaryenConst(the_module, BinaryenLiteralVec128(t238));
+ expressions[662] = BinaryenConst(the_module, BinaryenLiteralVec128(t238));
}
{
uint8_t t239[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[651] = BinaryenConst(the_module, BinaryenLiteralVec128(t239));
+ expressions[663] = BinaryenConst(the_module, BinaryenLiteralVec128(t239));
}
{
uint8_t t240[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- expressions[652] = BinaryenConst(the_module, BinaryenLiteralVec128(t240));
- }
- expressions[653] = BinaryenSIMDTernary(the_module, 4, expressions[650], expressions[651], expressions[652]);
- expressions[654] = BinaryenConst(the_module, BinaryenLiteralInt32(1024));
- expressions[655] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- expressions[656] = BinaryenConst(the_module, BinaryenLiteralInt32(12));
- expressions[657] = BinaryenMemoryInit(the_module, 0, expressions[654], expressions[655], expressions[656]);
- expressions[658] = BinaryenDataDrop(the_module, 0);
- expressions[659] = BinaryenConst(the_module, BinaryenLiteralInt32(2048));
- expressions[660] = BinaryenConst(the_module, BinaryenLiteralInt32(1024));
- expressions[661] = BinaryenConst(the_module, BinaryenLiteralInt32(12));
- expressions[662] = BinaryenMemoryCopy(the_module, expressions[659], expressions[660], expressions[661]);
- expressions[663] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- expressions[664] = BinaryenConst(the_module, BinaryenLiteralInt32(42));
- expressions[665] = BinaryenConst(the_module, BinaryenLiteralInt32(1024));
- expressions[666] = BinaryenMemoryFill(the_module, expressions[663], expressions[664], expressions[665]);
+ expressions[664] = BinaryenConst(the_module, BinaryenLiteralVec128(t240));
+ }
+ expressions[665] = BinaryenSIMDTernary(the_module, 4, expressions[662], expressions[663], expressions[664]);
+ expressions[666] = BinaryenConst(the_module, BinaryenLiteralInt32(1024));
+ expressions[667] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[668] = BinaryenConst(the_module, BinaryenLiteralInt32(12));
+ expressions[669] = BinaryenMemoryInit(the_module, 0, expressions[666], expressions[667], expressions[668]);
+ expressions[670] = BinaryenDataDrop(the_module, 0);
+ expressions[671] = BinaryenConst(the_module, BinaryenLiteralInt32(2048));
+ expressions[672] = BinaryenConst(the_module, BinaryenLiteralInt32(1024));
+ expressions[673] = BinaryenConst(the_module, BinaryenLiteralInt32(12));
+ expressions[674] = BinaryenMemoryCopy(the_module, expressions[671], expressions[672], expressions[673]);
+ expressions[675] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[676] = BinaryenConst(the_module, BinaryenLiteralInt32(42));
+ expressions[677] = BinaryenConst(the_module, BinaryenLiteralInt32(1024));
+ expressions[678] = BinaryenMemoryFill(the_module, expressions[675], expressions[676], expressions[677]);
{
BinaryenExpressionRef children[] = { 0 };
- expressions[667] = BinaryenBlock(the_module, NULL, children, 0, BinaryenTypeAuto());
- }
- expressions[668] = BinaryenIf(the_module, expressions[18], expressions[19], expressions[20]);
- expressions[669] = BinaryenIf(the_module, expressions[21], expressions[22], expressions[0]);
- expressions[670] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- expressions[671] = BinaryenLoop(the_module, "in", expressions[670]);
- expressions[672] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
- expressions[673] = BinaryenLoop(the_module, NULL, expressions[672]);
- expressions[674] = BinaryenBreak(the_module, "the-value", expressions[23], expressions[24]);
- expressions[675] = BinaryenConst(the_module, BinaryenLiteralInt32(2));
- expressions[676] = BinaryenBreak(the_module, "the-nothing", expressions[675], expressions[0]);
- expressions[677] = BinaryenConst(the_module, BinaryenLiteralInt32(3));
- expressions[678] = BinaryenBreak(the_module, "the-value", expressions[0], expressions[677]);
- expressions[679] = BinaryenBreak(the_module, "the-nothing", expressions[0], expressions[0]);
+ expressions[679] = BinaryenBlock(the_module, NULL, children, 0, BinaryenTypeAuto());
+ }
+ expressions[680] = BinaryenIf(the_module, expressions[18], expressions[19], expressions[20]);
+ expressions[681] = BinaryenIf(the_module, expressions[21], expressions[22], expressions[0]);
+ expressions[682] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[683] = BinaryenLoop(the_module, "in", expressions[682]);
+ expressions[684] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
+ expressions[685] = BinaryenLoop(the_module, NULL, expressions[684]);
+ expressions[686] = BinaryenBreak(the_module, "the-value", expressions[23], expressions[24]);
+ expressions[687] = BinaryenConst(the_module, BinaryenLiteralInt32(2));
+ expressions[688] = BinaryenBreak(the_module, "the-nothing", expressions[687], expressions[0]);
+ expressions[689] = BinaryenConst(the_module, BinaryenLiteralInt32(3));
+ expressions[690] = BinaryenBreak(the_module, "the-value", expressions[0], expressions[689]);
+ expressions[691] = BinaryenBreak(the_module, "the-nothing", expressions[0], expressions[0]);
{
const char* names[] = { "the-value" };
- expressions[680] = BinaryenSwitch(the_module, names, 1, "the-value", expressions[25], expressions[26]);
+ expressions[692] = BinaryenSwitch(the_module, names, 1, "the-value", expressions[25], expressions[26]);
}
- expressions[681] = BinaryenConst(the_module, BinaryenLiteralInt32(2));
+ expressions[693] = BinaryenConst(the_module, BinaryenLiteralInt32(2));
{
const char* names[] = { "the-nothing" };
- expressions[682] = BinaryenSwitch(the_module, names, 1, "the-nothing", expressions[681], expressions[0]);
+ expressions[694] = BinaryenSwitch(the_module, names, 1, "the-nothing", expressions[693], expressions[0]);
}
{
BinaryenExpressionRef operands[] = { expressions[10], expressions[11], expressions[12], expressions[13] };
- expressions[683] = BinaryenCall(the_module, "kitchen()sinker", operands, 4, 1);
+ expressions[695] = BinaryenCall(the_module, "kitchen()sinker", operands, 4, 1);
}
- expressions[684] = BinaryenUnary(the_module, 20, expressions[683]);
+ expressions[696] = BinaryenUnary(the_module, 20, expressions[695]);
{
BinaryenExpressionRef operands[] = { expressions[8], expressions[9] };
- expressions[685] = BinaryenCall(the_module, "an-imported", operands, 2, 3);
+ expressions[697] = BinaryenCall(the_module, "an-imported", operands, 2, 3);
}
- expressions[686] = BinaryenUnary(the_module, 25, expressions[685]);
- expressions[687] = BinaryenUnary(the_module, 20, expressions[686]);
- expressions[688] = BinaryenConst(the_module, BinaryenLiteralInt32(2449));
+ expressions[698] = BinaryenUnary(the_module, 25, expressions[697]);
+ expressions[699] = BinaryenUnary(the_module, 20, expressions[698]);
+ expressions[700] = BinaryenConst(the_module, BinaryenLiteralInt32(2449));
{
BinaryenExpressionRef operands[] = { expressions[14], expressions[15], expressions[16], expressions[17] };
- expressions[689] = BinaryenCallIndirect(the_module, expressions[688], operands, 4, "iiIfF");
- }
- expressions[690] = BinaryenUnary(the_module, 20, expressions[689]);
- expressions[691] = BinaryenLocalGet(the_module, 0, 1);
- expressions[692] = BinaryenDrop(the_module, expressions[691]);
- expressions[693] = BinaryenConst(the_module, BinaryenLiteralInt32(101));
- expressions[694] = BinaryenLocalSet(the_module, 0, expressions[693]);
- expressions[695] = BinaryenConst(the_module, BinaryenLiteralInt32(102));
- expressions[696] = BinaryenLocalTee(the_module, 0, expressions[695]);
- expressions[697] = BinaryenDrop(the_module, expressions[696]);
- expressions[698] = BinaryenConst(the_module, BinaryenLiteralInt32(1));
- expressions[699] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[698]);
- expressions[700] = BinaryenConst(the_module, BinaryenLiteralInt32(8));
- expressions[701] = BinaryenLoad(the_module, 2, 1, 2, 1, 2, expressions[700]);
- expressions[702] = BinaryenConst(the_module, BinaryenLiteralInt32(2));
- expressions[703] = BinaryenLoad(the_module, 4, 0, 0, 0, 3, expressions[702]);
- expressions[704] = BinaryenConst(the_module, BinaryenLiteralInt32(9));
- expressions[705] = BinaryenLoad(the_module, 8, 0, 2, 8, 4, expressions[704]);
- expressions[706] = BinaryenStore(the_module, 4, 0, 0, expressions[30], expressions[31], 1);
- expressions[707] = BinaryenStore(the_module, 8, 2, 4, expressions[32], expressions[33], 2);
- expressions[708] = BinaryenSelect(the_module, expressions[27], expressions[28], expressions[29]);
- expressions[709] = BinaryenConst(the_module, BinaryenLiteralInt32(1337));
- expressions[710] = BinaryenReturn(the_module, expressions[709]);
+ expressions[701] = BinaryenCallIndirect(the_module, expressions[700], operands, 4, "iiIfF");
+ }
+ expressions[702] = BinaryenUnary(the_module, 20, expressions[701]);
+ expressions[703] = BinaryenLocalGet(the_module, 0, 1);
+ expressions[704] = BinaryenDrop(the_module, expressions[703]);
+ expressions[705] = BinaryenConst(the_module, BinaryenLiteralInt32(101));
+ expressions[706] = BinaryenLocalSet(the_module, 0, expressions[705]);
+ expressions[707] = BinaryenConst(the_module, BinaryenLiteralInt32(102));
+ expressions[708] = BinaryenLocalTee(the_module, 0, expressions[707]);
+ expressions[709] = BinaryenDrop(the_module, expressions[708]);
+ expressions[710] = BinaryenConst(the_module, BinaryenLiteralInt32(1));
+ expressions[711] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[710]);
+ expressions[712] = BinaryenConst(the_module, BinaryenLiteralInt32(8));
+ expressions[713] = BinaryenLoad(the_module, 2, 1, 2, 1, 2, expressions[712]);
+ expressions[714] = BinaryenConst(the_module, BinaryenLiteralInt32(2));
+ expressions[715] = BinaryenLoad(the_module, 4, 0, 0, 0, 3, expressions[714]);
+ expressions[716] = BinaryenConst(the_module, BinaryenLiteralInt32(9));
+ expressions[717] = BinaryenLoad(the_module, 8, 0, 2, 8, 4, expressions[716]);
+ expressions[718] = BinaryenStore(the_module, 4, 0, 0, expressions[30], expressions[31], 1);
+ expressions[719] = BinaryenStore(the_module, 8, 2, 4, expressions[32], expressions[33], 2);
+ expressions[720] = BinaryenSelect(the_module, expressions[27], expressions[28], expressions[29]);
+ expressions[721] = BinaryenConst(the_module, BinaryenLiteralInt32(1337));
+ expressions[722] = BinaryenReturn(the_module, expressions[721]);
{
BinaryenExpressionRef operands[] = { expressions[10], expressions[11], expressions[12], expressions[13] };
- expressions[711] = BinaryenReturnCall(the_module, "kitchen()sinker", operands, 4, 1);
+ expressions[723] = BinaryenReturnCall(the_module, "kitchen()sinker", operands, 4, 1);
}
- expressions[712] = BinaryenConst(the_module, BinaryenLiteralInt32(2449));
+ expressions[724] = BinaryenConst(the_module, BinaryenLiteralInt32(2449));
{
BinaryenExpressionRef operands[] = { expressions[14], expressions[15], expressions[16], expressions[17] };
- expressions[713] = BinaryenReturnCallIndirect(the_module, expressions[712], operands, 4, "iiIfF");
- }
- expressions[714] = BinaryenTry(the_module, expressions[35], expressions[43]);
- expressions[715] = BinaryenAtomicLoad(the_module, 4, 0, 1, expressions[23]);
- expressions[716] = BinaryenAtomicStore(the_module, 4, 0, expressions[23], expressions[715], 1);
- expressions[717] = BinaryenAtomicWait(the_module, expressions[23], expressions[23], expressions[33], 1);
- expressions[718] = BinaryenDrop(the_module, expressions[717]);
- expressions[719] = BinaryenAtomicNotify(the_module, expressions[23], expressions[23]);
- expressions[720] = BinaryenDrop(the_module, expressions[719]);
- expressions[721] = BinaryenAtomicFence(the_module);
- expressions[722] = BinaryenNop(the_module);
- expressions[723] = BinaryenUnreachable(the_module);
+ expressions[725] = BinaryenReturnCallIndirect(the_module, expressions[724], operands, 4, "iiIfF");
+ }
+ expressions[726] = BinaryenTry(the_module, expressions[35], expressions[43]);
+ expressions[727] = BinaryenAtomicLoad(the_module, 4, 0, 1, expressions[23]);
+ expressions[728] = BinaryenAtomicStore(the_module, 4, 0, expressions[23], expressions[727], 1);
+ expressions[729] = BinaryenAtomicWait(the_module, expressions[23], expressions[23], expressions[33], 1);
+ expressions[730] = BinaryenDrop(the_module, expressions[729]);
+ expressions[731] = BinaryenAtomicNotify(the_module, expressions[23], expressions[23]);
+ expressions[732] = BinaryenDrop(the_module, expressions[731]);
+ expressions[733] = BinaryenAtomicFence(the_module);
+ expressions[734] = BinaryenNop(the_module);
+ expressions[735] = BinaryenUnreachable(the_module);
BinaryenExpressionPrint(expressions[51]);
(f32.neg
(f32.const -33.61199951171875)
@@ -3647,34 +3689,35 @@ int main() {
expressions[580], expressions[583], expressions[586], expressions[589], expressions[592], expressions[595],
expressions[598], expressions[601], expressions[604], expressions[607], expressions[610], expressions[613],
expressions[616], expressions[619], expressions[622], expressions[624], expressions[626], expressions[628],
- expressions[630], expressions[633], expressions[637], expressions[641], expressions[645], expressions[649],
- expressions[653], expressions[657], expressions[658], expressions[662], expressions[666], expressions[667],
- expressions[668], expressions[669], expressions[671], expressions[673], expressions[674], expressions[676],
- expressions[678], expressions[679], expressions[680], expressions[682], expressions[684], expressions[687],
- expressions[690], expressions[692], expressions[694], expressions[697], expressions[699], expressions[701],
- expressions[703], expressions[705], expressions[706], expressions[707], expressions[708], expressions[710],
- expressions[711], expressions[713], expressions[714], expressions[716], expressions[718], expressions[720],
- expressions[721], expressions[722], expressions[723] };
- expressions[724] = BinaryenBlock(the_module, "the-value", children, 272, BinaryenTypeAuto());
+ expressions[630], expressions[632], expressions[634], expressions[636], expressions[638], expressions[640],
+ expressions[642], expressions[645], expressions[649], expressions[653], expressions[657], expressions[661],
+ expressions[665], expressions[669], expressions[670], expressions[674], expressions[678], expressions[679],
+ expressions[680], expressions[681], expressions[683], expressions[685], expressions[686], expressions[688],
+ expressions[690], expressions[691], expressions[692], expressions[694], expressions[696], expressions[699],
+ expressions[702], expressions[704], expressions[706], expressions[709], expressions[711], expressions[713],
+ expressions[715], expressions[717], expressions[718], expressions[719], expressions[720], expressions[722],
+ expressions[723], expressions[725], expressions[726], expressions[728], expressions[730], expressions[732],
+ expressions[733], expressions[734], expressions[735] };
+ expressions[736] = BinaryenBlock(the_module, "the-value", children, 278, BinaryenTypeAuto());
}
- expressions[725] = BinaryenDrop(the_module, expressions[724]);
+ expressions[737] = BinaryenDrop(the_module, expressions[736]);
{
- BinaryenExpressionRef children[] = { expressions[725] };
- expressions[726] = BinaryenBlock(the_module, "the-nothing", children, 1, BinaryenTypeAuto());
+ BinaryenExpressionRef children[] = { expressions[737] };
+ expressions[738] = BinaryenBlock(the_module, "the-nothing", children, 1, BinaryenTypeAuto());
}
- expressions[727] = BinaryenConst(the_module, BinaryenLiteralInt32(42));
+ expressions[739] = BinaryenConst(the_module, BinaryenLiteralInt32(42));
{
- BinaryenExpressionRef children[] = { expressions[726], expressions[727] };
- expressions[728] = BinaryenBlock(the_module, "the-body", children, 2, BinaryenTypeAuto());
+ BinaryenExpressionRef children[] = { expressions[738], expressions[739] };
+ expressions[740] = BinaryenBlock(the_module, "the-body", children, 2, BinaryenTypeAuto());
}
{
BinaryenType varTypes[] = { 1, 7 };
- functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[0], varTypes, 2, expressions[728]);
+ functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[0], varTypes, 2, expressions[740]);
}
- expressions[729] = BinaryenConst(the_module, BinaryenLiteralInt32(7));
- globals[0] = BinaryenAddGlobal(the_module, "a-global", 1, 0, expressions[729]);
- expressions[730] = BinaryenConst(the_module, BinaryenLiteralFloat32(7.5));
- globals[1] = BinaryenAddGlobal(the_module, "a-mutable-global", 3, 1, expressions[730]);
+ expressions[741] = BinaryenConst(the_module, BinaryenLiteralInt32(7));
+ globals[0] = BinaryenAddGlobal(the_module, "a-global", 1, 0, expressions[741]);
+ expressions[742] = BinaryenConst(the_module, BinaryenLiteralFloat32(7.5));
+ globals[1] = BinaryenAddGlobal(the_module, "a-mutable-global", 3, 1, expressions[742]);
{
BinaryenType paramTypes[] = { 1, 4 };
functionTypes[2] = BinaryenAddFunctionType(the_module, "fiF", 3, paramTypes, 2);
@@ -3686,13 +3729,13 @@ int main() {
const char* funcNames[] = { "kitchen()sinker" };
BinaryenSetFunctionTable(the_module, 1, 1, funcNames, 1);
}
- expressions[731] = BinaryenConst(the_module, BinaryenLiteralInt32(10));
+ expressions[743] = BinaryenConst(the_module, BinaryenLiteralInt32(10));
{
const char segment0[] = { 104, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100 };
const char segment1[] = { 73, 32, 97, 109, 32, 112, 97, 115, 115, 105, 118, 101 };
const char* segments[] = { segment0, segment1 };
int8_t segmentPassive[] = { 0, 1 };
- BinaryenExpressionRef segmentOffsets[] = { expressions[731], expressions[0] };
+ BinaryenExpressionRef segmentOffsets[] = { expressions[743], expressions[0] };
BinaryenIndex segmentSizes[] = { 12, 12 };
BinaryenSetMemory(the_module, 1, 256, "mem", segments, segmentPassive, segmentOffsets, segmentSizes, 2, 1);
}
@@ -3700,10 +3743,10 @@ int main() {
BinaryenType paramTypes[] = { 0 };
functionTypes[3] = BinaryenAddFunctionType(the_module, "v", 0, paramTypes, 0);
}
- expressions[732] = BinaryenNop(the_module);
+ expressions[744] = BinaryenNop(the_module);
{
BinaryenType varTypes[] = { 0 };
- functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[3], varTypes, 0, expressions[732]);
+ functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[3], varTypes, 0, expressions[744]);
}
BinaryenSetStart(the_module, functions[1]);
{
@@ -5012,6 +5055,36 @@ int main() {
)
)
(drop
+ (i16x8.load8x8_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i16x8.load8x8_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_u
+ (i32.const 128)
+ )
+ )
+ (drop
(v8x16.shuffle 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt
index f8a1a1c4a..56602ef13 100644
--- a/test/example/c-api-kitchen-sink.txt.txt
+++ b/test/example/c-api-kitchen-sink.txt.txt
@@ -1298,6 +1298,36 @@
)
)
(drop
+ (i16x8.load8x8_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i16x8.load8x8_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i32x4.load16x4_u
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_s
+ (i32.const 128)
+ )
+ )
+ (drop
+ (i64x2.load32x2_u
+ (i32.const 128)
+ )
+ )
+ (drop
(v8x16.shuffle 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
diff --git a/test/simd.wast b/test/simd.wast
index 1b0b33f4c..facaf0e83 100644
--- a/test/simd.wast
+++ b/test/simd.wast
@@ -840,6 +840,26 @@
(local.get $0)
)
)
+ (func $v8x16.load_splat (param $0 i32) (result v128)
+ (v8x16.load_splat
+ (local.get $0)
+ )
+ )
+ (func $v16x8.load_splat (param $0 i32) (result v128)
+ (v16x8.load_splat
+ (local.get $0)
+ )
+ )
+ (func $v32x4.load_splat (param $0 i32) (result v128)
+ (v32x4.load_splat
+ (local.get $0)
+ )
+ )
+ (func $v64x2.load_splat (param $0 i32) (result v128)
+ (v64x2.load_splat
+ (local.get $0)
+ )
+ )
(func $i8x16.narrow_i16x8_s (param $0 v128) (param $1 v128) (result v128)
(i8x16.narrow_i16x8_s
(local.get $0)
@@ -904,4 +924,34 @@
(local.get $0)
)
)
+ (func $i16x8.load8x8_u (param $0 i32) (result v128)
+ (i16x8.load8x8_u
+ (local.get $0)
+ )
+ )
+ (func $i16x8.load8x8_s (param $0 i32) (result v128)
+ (i16x8.load8x8_s
+ (local.get $0)
+ )
+ )
+ (func $i32x4.load16x4_s (param $0 i32) (result v128)
+ (i32x4.load16x4_s
+ (local.get $0)
+ )
+ )
+ (func $i32x4.load16x4_u (param $0 i32) (result v128)
+ (i32x4.load16x4_u
+ (local.get $0)
+ )
+ )
+ (func $i64x2.load32x2_s (param $0 i32) (result v128)
+ (i64x2.load32x2_s
+ (local.get $0)
+ )
+ )
+ (func $i64x2.load32x2_u (param $0 i32) (result v128)
+ (i64x2.load32x2_u
+ (local.get $0)
+ )
+ )
)
diff --git a/test/simd.wast.from-wast b/test/simd.wast.from-wast
index a05ddbf32..b02b77c4e 100644
--- a/test/simd.wast.from-wast
+++ b/test/simd.wast.from-wast
@@ -856,68 +856,118 @@
(local.get $0)
)
)
- (func $i8x16.narrow_i16x8_s (; 149 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128)
+ (func $v8x16.load_splat (; 149 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128)
+ (v8x16.load_splat
+ (local.get $0)
+ )
+ )
+ (func $v16x8.load_splat (; 150 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128)
+ (v16x8.load_splat
+ (local.get $0)
+ )
+ )
+ (func $v32x4.load_splat (; 151 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128)
+ (v32x4.load_splat
+ (local.get $0)
+ )
+ )
+ (func $v64x2.load_splat (; 152 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128)
+ (v64x2.load_splat
+ (local.get $0)
+ )
+ )
+ (func $i8x16.narrow_i16x8_s (; 153 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128)
(i8x16.narrow_i16x8_s
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.narrow_i16x8_u (; 150 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.narrow_i16x8_u (; 154 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128)
(i8x16.narrow_i16x8_u
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.narrow_i32x4_s (; 151 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.narrow_i32x4_s (; 155 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128)
(i16x8.narrow_i32x4_s
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.narrow_i32x4_u (; 152 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.narrow_i32x4_u (; 156 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128)
(i16x8.narrow_i32x4_u
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.widen_low_i8x16_s (; 153 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
+ (func $i16x8.widen_low_i8x16_s (; 157 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
(i16x8.widen_low_i8x16_s
(local.get $0)
)
)
- (func $i16x8.widen_high_i8x16_s (; 154 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
+ (func $i16x8.widen_high_i8x16_s (; 158 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
(i16x8.widen_high_i8x16_s
(local.get $0)
)
)
- (func $i16x8.widen_low_i8x16_u (; 155 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
+ (func $i16x8.widen_low_i8x16_u (; 159 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
(i16x8.widen_low_i8x16_u
(local.get $0)
)
)
- (func $i16x8.widen_high_i8x16_u (; 156 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
+ (func $i16x8.widen_high_i8x16_u (; 160 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
(i16x8.widen_high_i8x16_u
(local.get $0)
)
)
- (func $i32x4.widen_low_i16x8_s (; 157 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
+ (func $i32x4.widen_low_i16x8_s (; 161 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
(i32x4.widen_low_i16x8_s
(local.get $0)
)
)
- (func $i32x4.widen_high_i16x8_s (; 158 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
+ (func $i32x4.widen_high_i16x8_s (; 162 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
(i32x4.widen_high_i16x8_s
(local.get $0)
)
)
- (func $i32x4.widen_low_i16x8_u (; 159 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
+ (func $i32x4.widen_low_i16x8_u (; 163 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
(i32x4.widen_low_i16x8_u
(local.get $0)
)
)
- (func $i32x4.widen_high_i16x8_u (; 160 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
+ (func $i32x4.widen_high_i16x8_u (; 164 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128)
(i32x4.widen_high_i16x8_u
(local.get $0)
)
)
+ (func $i16x8.load8x8_u (; 165 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128)
+ (i16x8.load8x8_u
+ (local.get $0)
+ )
+ )
+ (func $i16x8.load8x8_s (; 166 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128)
+ (i16x8.load8x8_s
+ (local.get $0)
+ )
+ )
+ (func $i32x4.load16x4_s (; 167 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128)
+ (i32x4.load16x4_s
+ (local.get $0)
+ )
+ )
+ (func $i32x4.load16x4_u (; 168 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128)
+ (i32x4.load16x4_u
+ (local.get $0)
+ )
+ )
+ (func $i64x2.load32x2_s (; 169 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128)
+ (i64x2.load32x2_s
+ (local.get $0)
+ )
+ )
+ (func $i64x2.load32x2_u (; 170 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128)
+ (i64x2.load32x2_u
+ (local.get $0)
+ )
+ )
)
diff --git a/test/simd.wast.fromBinary b/test/simd.wast.fromBinary
index fb53bf003..ae0c9828c 100644
--- a/test/simd.wast.fromBinary
+++ b/test/simd.wast.fromBinary
@@ -856,69 +856,119 @@
(local.get $0)
)
)
- (func $i8x16.narrow_i16x8_s (; 149 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $v8x16.load_splat (; 149 ;) (type $0) (param $0 i32) (result v128)
+ (v8x16.load_splat
+ (local.get $0)
+ )
+ )
+ (func $v16x8.load_splat (; 150 ;) (type $0) (param $0 i32) (result v128)
+ (v16x8.load_splat
+ (local.get $0)
+ )
+ )
+ (func $v32x4.load_splat (; 151 ;) (type $0) (param $0 i32) (result v128)
+ (v32x4.load_splat
+ (local.get $0)
+ )
+ )
+ (func $v64x2.load_splat (; 152 ;) (type $0) (param $0 i32) (result v128)
+ (v64x2.load_splat
+ (local.get $0)
+ )
+ )
+ (func $i8x16.narrow_i16x8_s (; 153 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
(i8x16.narrow_i16x8_s
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.narrow_i16x8_u (; 150 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.narrow_i16x8_u (; 154 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
(i8x16.narrow_i16x8_u
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.narrow_i32x4_s (; 151 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.narrow_i32x4_s (; 155 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
(i16x8.narrow_i32x4_s
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.narrow_i32x4_u (; 152 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.narrow_i32x4_u (; 156 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
(i16x8.narrow_i32x4_u
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.widen_low_i8x16_s (; 153 ;) (type $14) (param $0 v128) (result v128)
+ (func $i16x8.widen_low_i8x16_s (; 157 ;) (type $14) (param $0 v128) (result v128)
(i16x8.widen_low_i8x16_s
(local.get $0)
)
)
- (func $i16x8.widen_high_i8x16_s (; 154 ;) (type $14) (param $0 v128) (result v128)
+ (func $i16x8.widen_high_i8x16_s (; 158 ;) (type $14) (param $0 v128) (result v128)
(i16x8.widen_high_i8x16_s
(local.get $0)
)
)
- (func $i16x8.widen_low_i8x16_u (; 155 ;) (type $14) (param $0 v128) (result v128)
+ (func $i16x8.widen_low_i8x16_u (; 159 ;) (type $14) (param $0 v128) (result v128)
(i16x8.widen_low_i8x16_u
(local.get $0)
)
)
- (func $i16x8.widen_high_i8x16_u (; 156 ;) (type $14) (param $0 v128) (result v128)
+ (func $i16x8.widen_high_i8x16_u (; 160 ;) (type $14) (param $0 v128) (result v128)
(i16x8.widen_high_i8x16_u
(local.get $0)
)
)
- (func $i32x4.widen_low_i16x8_s (; 157 ;) (type $14) (param $0 v128) (result v128)
+ (func $i32x4.widen_low_i16x8_s (; 161 ;) (type $14) (param $0 v128) (result v128)
(i32x4.widen_low_i16x8_s
(local.get $0)
)
)
- (func $i32x4.widen_high_i16x8_s (; 158 ;) (type $14) (param $0 v128) (result v128)
+ (func $i32x4.widen_high_i16x8_s (; 162 ;) (type $14) (param $0 v128) (result v128)
(i32x4.widen_high_i16x8_s
(local.get $0)
)
)
- (func $i32x4.widen_low_i16x8_u (; 159 ;) (type $14) (param $0 v128) (result v128)
+ (func $i32x4.widen_low_i16x8_u (; 163 ;) (type $14) (param $0 v128) (result v128)
(i32x4.widen_low_i16x8_u
(local.get $0)
)
)
- (func $i32x4.widen_high_i16x8_u (; 160 ;) (type $14) (param $0 v128) (result v128)
+ (func $i32x4.widen_high_i16x8_u (; 164 ;) (type $14) (param $0 v128) (result v128)
(i32x4.widen_high_i16x8_u
(local.get $0)
)
)
+ (func $i16x8.load8x8_u (; 165 ;) (type $0) (param $0 i32) (result v128)
+ (i16x8.load8x8_u
+ (local.get $0)
+ )
+ )
+ (func $i16x8.load8x8_s (; 166 ;) (type $0) (param $0 i32) (result v128)
+ (i16x8.load8x8_s
+ (local.get $0)
+ )
+ )
+ (func $i32x4.load16x4_s (; 167 ;) (type $0) (param $0 i32) (result v128)
+ (i32x4.load16x4_s
+ (local.get $0)
+ )
+ )
+ (func $i32x4.load16x4_u (; 168 ;) (type $0) (param $0 i32) (result v128)
+ (i32x4.load16x4_u
+ (local.get $0)
+ )
+ )
+ (func $i64x2.load32x2_s (; 169 ;) (type $0) (param $0 i32) (result v128)
+ (i64x2.load32x2_s
+ (local.get $0)
+ )
+ )
+ (func $i64x2.load32x2_u (; 170 ;) (type $0) (param $0 i32) (result v128)
+ (i64x2.load32x2_u
+ (local.get $0)
+ )
+ )
)
diff --git a/test/simd.wast.fromBinary.noDebugInfo b/test/simd.wast.fromBinary.noDebugInfo
index 032d7a250..a59ca2e5d 100644
--- a/test/simd.wast.fromBinary.noDebugInfo
+++ b/test/simd.wast.fromBinary.noDebugInfo
@@ -856,69 +856,119 @@
(local.get $0)
)
)
- (func $149 (; 149 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $149 (; 149 ;) (type $0) (param $0 i32) (result v128)
+ (v8x16.load_splat
+ (local.get $0)
+ )
+ )
+ (func $150 (; 150 ;) (type $0) (param $0 i32) (result v128)
+ (v16x8.load_splat
+ (local.get $0)
+ )
+ )
+ (func $151 (; 151 ;) (type $0) (param $0 i32) (result v128)
+ (v32x4.load_splat
+ (local.get $0)
+ )
+ )
+ (func $152 (; 152 ;) (type $0) (param $0 i32) (result v128)
+ (v64x2.load_splat
+ (local.get $0)
+ )
+ )
+ (func $153 (; 153 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
(i8x16.narrow_i16x8_s
(local.get $0)
(local.get $1)
)
)
- (func $150 (; 150 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $154 (; 154 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
(i8x16.narrow_i16x8_u
(local.get $0)
(local.get $1)
)
)
- (func $151 (; 151 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $155 (; 155 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
(i16x8.narrow_i32x4_s
(local.get $0)
(local.get $1)
)
)
- (func $152 (; 152 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $156 (; 156 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
(i16x8.narrow_i32x4_u
(local.get $0)
(local.get $1)
)
)
- (func $153 (; 153 ;) (type $14) (param $0 v128) (result v128)
+ (func $157 (; 157 ;) (type $14) (param $0 v128) (result v128)
(i16x8.widen_low_i8x16_s
(local.get $0)
)
)
- (func $154 (; 154 ;) (type $14) (param $0 v128) (result v128)
+ (func $158 (; 158 ;) (type $14) (param $0 v128) (result v128)
(i16x8.widen_high_i8x16_s
(local.get $0)
)
)
- (func $155 (; 155 ;) (type $14) (param $0 v128) (result v128)
+ (func $159 (; 159 ;) (type $14) (param $0 v128) (result v128)
(i16x8.widen_low_i8x16_u
(local.get $0)
)
)
- (func $156 (; 156 ;) (type $14) (param $0 v128) (result v128)
+ (func $160 (; 160 ;) (type $14) (param $0 v128) (result v128)
(i16x8.widen_high_i8x16_u
(local.get $0)
)
)
- (func $157 (; 157 ;) (type $14) (param $0 v128) (result v128)
+ (func $161 (; 161 ;) (type $14) (param $0 v128) (result v128)
(i32x4.widen_low_i16x8_s
(local.get $0)
)
)
- (func $158 (; 158 ;) (type $14) (param $0 v128) (result v128)
+ (func $162 (; 162 ;) (type $14) (param $0 v128) (result v128)
(i32x4.widen_high_i16x8_s
(local.get $0)
)
)
- (func $159 (; 159 ;) (type $14) (param $0 v128) (result v128)
+ (func $163 (; 163 ;) (type $14) (param $0 v128) (result v128)
(i32x4.widen_low_i16x8_u
(local.get $0)
)
)
- (func $160 (; 160 ;) (type $14) (param $0 v128) (result v128)
+ (func $164 (; 164 ;) (type $14) (param $0 v128) (result v128)
(i32x4.widen_high_i16x8_u
(local.get $0)
)
)
+ (func $165 (; 165 ;) (type $0) (param $0 i32) (result v128)
+ (i16x8.load8x8_u
+ (local.get $0)
+ )
+ )
+ (func $166 (; 166 ;) (type $0) (param $0 i32) (result v128)
+ (i16x8.load8x8_s
+ (local.get $0)
+ )
+ )
+ (func $167 (; 167 ;) (type $0) (param $0 i32) (result v128)
+ (i32x4.load16x4_s
+ (local.get $0)
+ )
+ )
+ (func $168 (; 168 ;) (type $0) (param $0 i32) (result v128)
+ (i32x4.load16x4_u
+ (local.get $0)
+ )
+ )
+ (func $169 (; 169 ;) (type $0) (param $0 i32) (result v128)
+ (i64x2.load32x2_s
+ (local.get $0)
+ )
+ )
+ (func $170 (; 170 ;) (type $0) (param $0 i32) (result v128)
+ (i64x2.load32x2_u
+ (local.get $0)
+ )
+ )
)
diff --git a/test/spec/simd.wast b/test/spec/simd.wast
index 81e679edb..5655fba48 100644
--- a/test/spec/simd.wast
+++ b/test/spec/simd.wast
@@ -1,6 +1,7 @@
(module
(memory 1)
(data (i32.const 128) "WASMSIMDGOESFAST")
+ (data (i32.const 256) "\80\90\a0\b0\c0\d0\e0\f0")
(func (export "v128.load") (param $0 i32) (result v128) (v128.load (local.get $0)))
(func (export "v128.store") (param $0 i32) (param $1 v128) (result v128)
(v128.store offset=0 align=16 (local.get $0) (local.get $1))
@@ -191,6 +192,12 @@
(func (export "i32x4.widen_high_i16x8_s") (param $0 v128) (result v128) (i32x4.widen_high_i16x8_s (local.get $0)))
(func (export "i32x4.widen_low_i16x8_u") (param $0 v128) (result v128) (i32x4.widen_low_i16x8_u (local.get $0)))
(func (export "i32x4.widen_high_i16x8_u") (param $0 v128) (result v128) (i32x4.widen_high_i16x8_u (local.get $0)))
+ (func (export "i16x8.load8x8_u") (param $0 i32) (result v128) (i16x8.load8x8_u (local.get $0)))
+ (func (export "i16x8.load8x8_s") (param $0 i32) (result v128) (i16x8.load8x8_s (local.get $0)))
+ (func (export "i32x4.load16x4_u") (param $0 i32) (result v128) (i32x4.load16x4_u (local.get $0)))
+ (func (export "i32x4.load16x4_s") (param $0 i32) (result v128) (i32x4.load16x4_s (local.get $0)))
+ (func (export "i64x2.load32x2_u") (param $0 i32) (result v128) (i64x2.load32x2_u (local.get $0)))
+ (func (export "i64x2.load32x2_s") (param $0 i32) (result v128) (i64x2.load32x2_s (local.get $0)))
)
;; Basic v128 manipulation
@@ -753,3 +760,9 @@
(assert_return (invoke "i32x4.widen_high_i16x8_s" (v128.const i16x8 0 1 -1 32768 32767 32769 16384 -16384)) (v128.const i32x4 32767 -32767 16384 -16384))
(assert_return (invoke "i32x4.widen_low_i16x8_u" (v128.const i16x8 0 1 -1 32768 32767 32769 16384 -16384)) (v128.const i32x4 0 1 65535 32768))
(assert_return (invoke "i32x4.widen_high_i16x8_u" (v128.const i16x8 0 1 -1 32768 32767 32769 16384 -16384)) (v128.const i32x4 32767 32769 16384 49152))
+(assert_return (invoke "i16x8.load8x8_s" (i32.const 256)) (v128.const i16x8 0xff80 0xff90 0xffa0 0xffb0 0xffc0 0xffd0 0xffe0 0xfff0))
+(assert_return (invoke "i16x8.load8x8_u" (i32.const 256)) (v128.const i16x8 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0))
+(assert_return (invoke "i32x4.load16x4_s" (i32.const 256)) (v128.const i32x4 0xffff9080 0xffffb0a0 0xffffd0c0 0xfffff0e0))
+(assert_return (invoke "i32x4.load16x4_u" (i32.const 256)) (v128.const i32x4 0x00009080 0x0000b0a0 0x0000d0c0 0x0000f0e0))
+(assert_return (invoke "i64x2.load32x2_s" (i32.const 256)) (v128.const i64x2 0xffffffffb0a09080 0xfffffffff0e0d0c0))
+(assert_return (invoke "i64x2.load32x2_u" (i32.const 256)) (v128.const i64x2 0x00000000b0a09080 0x00000000f0e0d0c0))