summaryrefslogtreecommitdiff
path: root/test/example
diff options
context:
space:
mode:
Diffstat (limited to 'test/example')
-rw-r--r--test/example/c-api-kitchen-sink.c58
-rw-r--r--test/example/c-api-kitchen-sink.txt40
2 files changed, 98 insertions, 0 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index bbffb1ea2..2dc167adc 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -685,6 +685,64 @@ void test_core() {
0,
8,
makeInt32(module, 128)),
+ // SIMD load/store lane
+ BinaryenSIMDLoadStoreLane(module,
+ BinaryenLoad8LaneVec128(),
+ 0,
+ 1,
+ 0,
+ makeInt32(module, 128),
+ makeVec128(module, v128_bytes)),
+ BinaryenSIMDLoadStoreLane(module,
+ BinaryenLoad16LaneVec128(),
+ 0,
+ 2,
+ 0,
+ makeInt32(module, 128),
+ makeVec128(module, v128_bytes)),
+ BinaryenSIMDLoadStoreLane(module,
+ BinaryenLoad32LaneVec128(),
+ 0,
+ 4,
+ 0,
+ makeInt32(module, 128),
+ makeVec128(module, v128_bytes)),
+ BinaryenSIMDLoadStoreLane(module,
+ BinaryenLoad64LaneVec128(),
+ 0,
+ 8,
+ 0,
+ makeInt32(module, 128),
+ makeVec128(module, v128_bytes)),
+
+ BinaryenSIMDLoadStoreLane(module,
+ BinaryenStore8LaneVec128(),
+ 0,
+ 1,
+ 0,
+ makeInt32(module, 128),
+ makeVec128(module, v128_bytes)),
+ BinaryenSIMDLoadStoreLane(module,
+ BinaryenStore16LaneVec128(),
+ 0,
+ 2,
+ 0,
+ makeInt32(module, 128),
+ makeVec128(module, v128_bytes)),
+ BinaryenSIMDLoadStoreLane(module,
+ BinaryenStore32LaneVec128(),
+ 0,
+ 4,
+ 0,
+ makeInt32(module, 128),
+ makeVec128(module, v128_bytes)),
+ BinaryenSIMDLoadStoreLane(module,
+ BinaryenStore64LaneVec128(),
+ 0,
+ 8,
+ 0,
+ makeInt32(module, 128),
+ makeVec128(module, v128_bytes)),
// 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 16dde8c00..0bdec4c37 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -1722,6 +1722,46 @@ BinaryenFeatureAll: 8191
)
)
(drop
+ (v128.load8_lane 0
+ (i32.const 128)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (v128.load16_lane 0
+ (i32.const 128)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (v128.load32_lane 0
+ (i32.const 128)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (v128.load64_lane 0
+ (i32.const 128)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (v128.store8_lane 0
+ (i32.const 128)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ (v128.store16_lane 0
+ (i32.const 128)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ (v128.store32_lane 0
+ (i32.const 128)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ (v128.store64_lane 0
+ (i32.const 128)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ (drop
(i8x16.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)