summaryrefslogtreecommitdiff
path: root/test/interp/simd-lane.txt
diff options
context:
space:
mode:
authorlizhengxing <unixhaha@gmail.com>2018-03-15 16:31:08 -0700
committerBen Smith <binjimin@gmail.com>2018-03-15 16:31:08 -0700
commite31a5623815a545e57db3eb0ec3988025b1b0f0e (patch)
tree5332a60f2177cb450a533d712e07bde85adf3d6d /test/interp/simd-lane.txt
parent3510ced20ab6242d11a7d1ab9a1b9f23dae9fb5d (diff)
downloadwabt-e31a5623815a545e57db3eb0ec3988025b1b0f0e.tar.gz
wabt-e31a5623815a545e57db3eb0ec3988025b1b0f0e.tar.bz2
wabt-e31a5623815a545e57db3eb0ec3988025b1b0f0e.zip
Simd Replace Lane instructions implementation. (#809)
Including: i8x16.replace_lane i16x8.replace_lane i32x4.replace_lane i64x2.replace_lane f32x4.replace_lane f64x2.replace_lane
Diffstat (limited to 'test/interp/simd-lane.txt')
-rw-r--r--test/interp/simd-lane.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/interp/simd-lane.txt b/test/interp/simd-lane.txt
index c62a3a09..c6062799 100644
--- a/test/interp/simd-lane.txt
+++ b/test/interp/simd-lane.txt
@@ -40,6 +40,46 @@
(func (export "func_f64x2_extract_lane_0") (result f64)
v128.const i32 0x00000000 0x40120000 0x0000ffff 0x0000017f
f64x2.extract_lane 0)
+
+ ;; i8x16 replace lane
+ (func (export "func_i8x16_replace_lane_0") (result v128)
+ v128.const i32 0x00000001 0x0000000f 0x000000ff 0x0000017f
+ i32.const 0xe5
+ i8x16.replace_lane 8)
+
+ ;; i16x8 replace lane
+ (func (export "func_i16x8_replace_lane_0") (result v128)
+ v128.const i32 0x00000001 0x0000000f 0x0000ffff 0x0000017f
+ i32.const 0xe5e6
+ i16x8.replace_lane 4)
+
+ ;; i32x4 replace lane
+ (func (export "func_i32x4_replace_lane_0") (result v128)
+ v128.const i32 0x00000001 0x0000000f 0x0000ffff 0x0000017f
+ i32.const 0x12345678
+ i32x4.replace_lane 2)
+
+ ;; i64x2 replace lane
+ (func (export "func_i64x2_replace_lane_0") (result v128)
+ v128.const i32 0x0000000f 0x00000000 0x0000ffff 0x0000017f
+ i64.const 0x0000123400005678
+ i64x2.replace_lane 0)
+
+ ;; f32x4 replace lane
+ ;; For Floating num:
+ ;; 1.5 = 0x3fc00000
+ (func (export "func_f32x4_replace_lane_0") (result v128)
+ v128.const i32 0x00000001 0x00000000 0x0000ffff 0x0000017f
+ f32.const 1.5
+ f32x4.replace_lane 1)
+
+ ;; f64x2 replace lane
+ ;; For Double num:
+ ;; 4.5 = 0x4012000000000000
+ (func (export "func_f64x2_replace_lane_0") (result v128)
+ v128.const i32 0x0000789a 0xff880330 0x0000ffff 0x0000017f
+ f64.const 4.5
+ f64x2.replace_lane 0)
)
(;; STDOUT ;;;
func_i8x16_extract_lane_s_0() => i32:4294967295
@@ -50,4 +90,10 @@ func_i32x4_extract_lane_0() => i32:65535
func_i64x2_extract_lane_0() => i64:15
func_f32x4_extract_lane_0() => f32:1.500000
func_f64x2_extract_lane_0() => f64:4.500000
+func_i8x16_replace_lane_0() => v128:0x00000001 0x0000000f 0x000000e5 0x0000017f
+func_i16x8_replace_lane_0() => v128:0x00000001 0x0000000f 0x0000e5e6 0x0000017f
+func_i32x4_replace_lane_0() => v128:0x00000001 0x0000000f 0x12345678 0x0000017f
+func_i64x2_replace_lane_0() => v128:0x00005678 0x00001234 0x0000ffff 0x0000017f
+func_f32x4_replace_lane_0() => v128:0x00000001 0x3fc00000 0x0000ffff 0x0000017f
+func_f64x2_replace_lane_0() => v128:0x00000000 0x40120000 0x0000ffff 0x0000017f
;;; STDOUT ;;)