Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

Commit

Permalink
[interpreter] Rename integer widen instructions to integer extend
Browse files Browse the repository at this point in the history
Fixed #467.
  • Loading branch information
ngzhian committed Feb 24, 2021
1 parent 33ba45f commit bc618a3
Show file tree
Hide file tree
Showing 14 changed files with 821 additions and 818 deletions.
24 changes: 12 additions & 12 deletions interpreter/binary/decode.ml
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,10 @@ let simd_prefix s =
| 0x84l -> i16x8_bitmask
| 0x85l -> i16x8_narrow_i32x4_s
| 0x86l -> i16x8_narrow_i32x4_u
| 0x87l -> i16x8_widen_low_i8x16_s
| 0x88l -> i16x8_widen_high_i8x16_s
| 0x89l -> i16x8_widen_low_i8x16_u
| 0x8al -> i16x8_widen_high_i8x16_u
| 0x87l -> i16x8_extend_low_i8x16_s
| 0x88l -> i16x8_extend_high_i8x16_s
| 0x89l -> i16x8_extend_low_i8x16_u
| 0x8al -> i16x8_extend_high_i8x16_u
| 0x8bl -> i16x8_shl
| 0x8cl -> i16x8_shr_s
| 0x8dl -> i16x8_shr_u
Expand Down Expand Up @@ -403,10 +403,10 @@ let simd_prefix s =
| 0xa4l -> i32x4_bitmask
| 0xa5l -> i32x4_extadd_pairwise_i16x8_s
| 0xa6l -> i32x4_extadd_pairwise_i16x8_u
| 0xa7l -> i32x4_widen_low_i16x8_s
| 0xa8l -> i32x4_widen_high_i16x8_s
| 0xa9l -> i32x4_widen_low_i16x8_u
| 0xaal -> i32x4_widen_high_i16x8_u
| 0xa7l -> i32x4_extend_low_i16x8_s
| 0xa8l -> i32x4_extend_high_i16x8_s
| 0xa9l -> i32x4_extend_low_i16x8_u
| 0xaal -> i32x4_extend_high_i16x8_u
| 0xabl -> i32x4_shl
| 0xacl -> i32x4_shr_s
| 0xadl -> i32x4_shr_u
Expand All @@ -427,10 +427,10 @@ let simd_prefix s =
| 0xc2l -> i16x8_extadd_pairwise_i8x16_s
| 0xc3l -> i16x8_extadd_pairwise_i8x16_u
| 0xc4l -> i64x2_bitmask
| 0xc7l -> i64x2_widen_low_i32x4_s
| 0xc8l -> i64x2_widen_high_i32x4_s
| 0xc9l -> i64x2_widen_low_i32x4_u
| 0xcal -> i64x2_widen_high_i32x4_u
| 0xc7l -> i64x2_extend_low_i32x4_s
| 0xc8l -> i64x2_extend_high_i32x4_s
| 0xc9l -> i64x2_extend_low_i32x4_u
| 0xcal -> i64x2_extend_high_i32x4_u
| 0xcbl -> i64x2_shl
| 0xccl -> i64x2_shr_s
| 0xcdl -> i64x2_shr_u
Expand Down
24 changes: 12 additions & 12 deletions interpreter/binary/encode.ml
Original file line number Diff line number Diff line change
Expand Up @@ -350,26 +350,26 @@ let encode m =
| Unary (V128 V128Op.(I8x16 Popcnt)) -> simd_op 0x7cl
| Unary (V128 V128Op.(I16x8 Abs)) -> simd_op 0x80l
| Unary (V128 V128Op.(I16x8 Neg)) -> simd_op 0x81l
| Unary (V128 V128Op.(I16x8 WidenLowS)) -> simd_op 0x87l
| Unary (V128 V128Op.(I16x8 WidenHighS)) -> simd_op 0x88l
| Unary (V128 V128Op.(I16x8 WidenLowU)) -> simd_op 0x89l
| Unary (V128 V128Op.(I16x8 WidenHighU)) -> simd_op 0x8al
| Unary (V128 V128Op.(I16x8 ExtendLowS)) -> simd_op 0x87l
| Unary (V128 V128Op.(I16x8 ExtendHighS)) -> simd_op 0x88l
| Unary (V128 V128Op.(I16x8 ExtendLowU)) -> simd_op 0x89l
| Unary (V128 V128Op.(I16x8 ExtendHighU)) -> simd_op 0x8al
| Unary (V128 V128Op.(I16x8 ExtAddPairwiseS)) -> simd_op 0xc2l
| Unary (V128 V128Op.(I16x8 ExtAddPairwiseU)) -> simd_op 0xc3l
| Unary (V128 V128Op.(I32x4 Abs)) -> simd_op 0xa0l
| Unary (V128 V128Op.(I32x4 Neg)) -> simd_op 0xa1l
| Unary (V128 V128Op.(I32x4 WidenLowS)) -> simd_op 0xa7l
| Unary (V128 V128Op.(I32x4 WidenHighS)) -> simd_op 0xa8l
| Unary (V128 V128Op.(I32x4 WidenLowU)) -> simd_op 0xa9l
| Unary (V128 V128Op.(I32x4 WidenHighU)) -> simd_op 0xaal
| Unary (V128 V128Op.(I32x4 ExtendLowS)) -> simd_op 0xa7l
| Unary (V128 V128Op.(I32x4 ExtendHighS)) -> simd_op 0xa8l
| Unary (V128 V128Op.(I32x4 ExtendLowU)) -> simd_op 0xa9l
| Unary (V128 V128Op.(I32x4 ExtendHighU)) -> simd_op 0xaal
| Unary (V128 V128Op.(I32x4 ExtAddPairwiseS)) -> simd_op 0xa5l
| Unary (V128 V128Op.(I32x4 ExtAddPairwiseU)) -> simd_op 0xa6l
| Unary (V128 V128Op.(I64x2 Abs)) -> simd_op 0xa2l
| Unary (V128 V128Op.(I64x2 Neg)) -> simd_op 0xc1l
| Unary (V128 V128Op.(I64x2 WidenLowS)) -> simd_op 0xc7l
| Unary (V128 V128Op.(I64x2 WidenHighS)) -> simd_op 0xc8l
| Unary (V128 V128Op.(I64x2 WidenLowU)) -> simd_op 0xc9l
| Unary (V128 V128Op.(I64x2 WidenHighU)) -> simd_op 0xcal
| Unary (V128 V128Op.(I64x2 ExtendLowS)) -> simd_op 0xc7l
| Unary (V128 V128Op.(I64x2 ExtendHighS)) -> simd_op 0xc8l
| Unary (V128 V128Op.(I64x2 ExtendLowU)) -> simd_op 0xc9l
| Unary (V128 V128Op.(I64x2 ExtendHighU)) -> simd_op 0xcal
| Unary (V128 V128Op.(F32x4 Ceil)) -> simd_op 0xd8l
| Unary (V128 V128Op.(F32x4 Floor)) -> simd_op 0xd9l
| Unary (V128 V128Op.(F32x4 Trunc)) -> simd_op 0xdal
Expand Down
24 changes: 12 additions & 12 deletions interpreter/exec/eval_simd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ module SimdOp (SXX : Simd.S) (Value : ValueType with type t = SXX.t) = struct
| I8x16 Popcnt -> to_value (SXX.I8x16.popcnt (of_value 1 v))
| I16x8 Neg -> to_value (SXX.I16x8.neg (of_value 1 v))
| I16x8 Abs -> to_value (SXX.I16x8.abs (of_value 1 v))
| I16x8 WidenLowS -> to_value (SXX.I16x8_convert.widen_low_s (of_value 1 v))
| I16x8 WidenHighS -> to_value (SXX.I16x8_convert.widen_high_s (of_value 1 v))
| I16x8 WidenLowU -> to_value (SXX.I16x8_convert.widen_low_u (of_value 1 v))
| I16x8 WidenHighU -> to_value (SXX.I16x8_convert.widen_high_u (of_value 1 v))
| I16x8 ExtendLowS -> to_value (SXX.I16x8_convert.extend_low_s (of_value 1 v))
| I16x8 ExtendHighS -> to_value (SXX.I16x8_convert.extend_high_s (of_value 1 v))
| I16x8 ExtendLowU -> to_value (SXX.I16x8_convert.extend_low_u (of_value 1 v))
| I16x8 ExtendHighU -> to_value (SXX.I16x8_convert.extend_high_u (of_value 1 v))
| I16x8 ExtAddPairwiseS -> to_value (SXX.I16x8_convert.extadd_pairwise_s (of_value 1 v))
| I16x8 ExtAddPairwiseU -> to_value (SXX.I16x8_convert.extadd_pairwise_u (of_value 1 v))
| I32x4 Abs -> to_value (SXX.I32x4.abs (of_value 1 v))
| I32x4 Neg -> to_value (SXX.I32x4.neg (of_value 1 v))
| I32x4 WidenLowS -> to_value (SXX.I32x4_convert.widen_low_s (of_value 1 v))
| I32x4 WidenHighS -> to_value (SXX.I32x4_convert.widen_high_s (of_value 1 v))
| I32x4 WidenLowU -> to_value (SXX.I32x4_convert.widen_low_u (of_value 1 v))
| I32x4 WidenHighU -> to_value (SXX.I32x4_convert.widen_high_u (of_value 1 v))
| I32x4 ExtendLowS -> to_value (SXX.I32x4_convert.extend_low_s (of_value 1 v))
| I32x4 ExtendHighS -> to_value (SXX.I32x4_convert.extend_high_s (of_value 1 v))
| I32x4 ExtendLowU -> to_value (SXX.I32x4_convert.extend_low_u (of_value 1 v))
| I32x4 ExtendHighU -> to_value (SXX.I32x4_convert.extend_high_u (of_value 1 v))
| I32x4 TruncSatF32x4S -> to_value (SXX.I32x4_convert.trunc_sat_f32x4_s (of_value 1 v))
| I32x4 TruncSatF32x4U -> to_value (SXX.I32x4_convert.trunc_sat_f32x4_u (of_value 1 v))
| I32x4 TruncSatF64x2SZero ->
Expand All @@ -41,10 +41,10 @@ module SimdOp (SXX : Simd.S) (Value : ValueType with type t = SXX.t) = struct
| I32x4 ExtAddPairwiseU -> to_value (SXX.I32x4_convert.extadd_pairwise_u (of_value 1 v))
| I64x2 Abs -> to_value (SXX.I64x2.abs (of_value 1 v))
| I64x2 Neg -> to_value (SXX.I64x2.neg (of_value 1 v))
| I64x2 WidenLowS -> to_value (SXX.I64x2_convert.widen_low_s (of_value 1 v))
| I64x2 WidenHighS -> to_value (SXX.I64x2_convert.widen_high_s (of_value 1 v))
| I64x2 WidenLowU -> to_value (SXX.I64x2_convert.widen_low_u (of_value 1 v))
| I64x2 WidenHighU -> to_value (SXX.I64x2_convert.widen_high_u (of_value 1 v))
| I64x2 ExtendLowS -> to_value (SXX.I64x2_convert.extend_low_s (of_value 1 v))
| I64x2 ExtendHighS -> to_value (SXX.I64x2_convert.extend_high_s (of_value 1 v))
| I64x2 ExtendLowU -> to_value (SXX.I64x2_convert.extend_low_u (of_value 1 v))
| I64x2 ExtendHighU -> to_value (SXX.I64x2_convert.extend_high_u (of_value 1 v))
| F32x4 Abs -> to_value (SXX.F32x4.abs (of_value 1 v))
| F32x4 Neg -> to_value (SXX.F32x4.neg (of_value 1 v))
| F32x4 Sqrt -> to_value (SXX.F32x4.sqrt (of_value 1 v))
Expand Down
85 changes: 44 additions & 41 deletions interpreter/exec/simd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ sig
module I16x8_convert : sig
val narrow_s : t -> t -> t
val narrow_u : t -> t -> t
val widen_low_s : t -> t
val widen_high_s : t -> t
val widen_low_u : t -> t
val widen_high_u : t -> t
val extend_low_s : t -> t
val extend_high_s : t -> t
val extend_low_u : t -> t
val extend_high_u : t -> t
val extmul_low_s : t -> t -> t
val extmul_high_s : t -> t -> t
val extmul_low_u : t -> t -> t
Expand All @@ -191,10 +191,10 @@ sig
val trunc_sat_f32x4_u : t -> t
val trunc_sat_f64x2_s_zero : t -> t
val trunc_sat_f64x2_u_zero : t -> t
val widen_low_s : t -> t
val widen_high_s : t -> t
val widen_low_u : t -> t
val widen_high_u : t -> t
val extend_low_s : t -> t
val extend_high_s : t -> t
val extend_low_u : t -> t
val extend_high_u : t -> t
val dot_i16x8_s : t -> t -> t
val extmul_low_s : t -> t -> t
val extmul_high_s : t -> t -> t
Expand All @@ -204,10 +204,10 @@ sig
val extadd_pairwise_u : t -> t
end
module I64x2_convert : sig
val widen_low_s : t -> t
val widen_high_s : t -> t
val widen_low_u : t -> t
val widen_high_u : t -> t
val extend_low_s : t -> t
val extend_high_s : t -> t
val extend_low_u : t -> t
val extend_high_u : t -> t
val extmul_low_s : t -> t -> t
val extmul_high_s : t -> t -> t
val extmul_low_u : t -> t -> t
Expand Down Expand Up @@ -445,16 +445,16 @@ struct
let ext_s = Int32.logand 0xffffffffl
let ext_u = Int32.logand 0xffl

let widen take_or_drop ext x = Rep.of_i16x8 (List.map ext (take_or_drop 8 (Rep.to_i8x16 x)))
let widen_low_s = widen Lib.List.take ext_s
let widen_high_s = widen Lib.List.drop ext_s
let widen_low_u = widen Lib.List.take ext_u
let widen_high_u = widen Lib.List.drop ext_u
let extend take_or_drop ext x = Rep.of_i16x8 (List.map ext (take_or_drop 8 (Rep.to_i8x16 x)))
let extend_low_s = extend Lib.List.take ext_s
let extend_high_s = extend Lib.List.drop ext_s
let extend_low_u = extend Lib.List.take ext_u
let extend_high_u = extend Lib.List.drop ext_u

let extmul_low_s x y = I16x8.mul (widen_low_s x) (widen_low_s y)
let extmul_high_s x y = I16x8.mul (widen_high_s x) (widen_high_s y)
let extmul_low_u x y = I16x8.mul (widen_low_u x) (widen_low_u y)
let extmul_high_u x y = I16x8.mul (widen_high_u x) (widen_high_u y)
let extmul_low_s x y = I16x8.mul (extend_low_s x) (extend_low_s y)
let extmul_high_s x y = I16x8.mul (extend_high_s x) (extend_high_s y)
let extmul_low_u x y = I16x8.mul (extend_low_u x) (extend_low_u y)
let extmul_high_u x y = I16x8.mul (extend_high_u x) (extend_high_u y)

let extadd ext x y = Int32.add (ext x) (ext y)
let extadd_pairwise_s x = Rep.of_i16x8 (Lib.List.pairwise (extadd ext_s) (Rep.to_i8x16 x))
Expand All @@ -474,12 +474,12 @@ struct
let ext_s = Int32.logand 0xffffffffl
let ext_u = Int32.logand 0xffffl

let widen take_or_drop ext x =
let extend take_or_drop ext x =
Rep.of_i32x4 (List.map ext (take_or_drop 4 (Rep.to_i16x8 x)))
let widen_low_s = widen Lib.List.take ext_s
let widen_high_s = widen Lib.List.drop ext_s
let widen_low_u = widen Lib.List.take ext_u
let widen_high_u = widen Lib.List.drop ext_u
let extend_low_s = extend Lib.List.take ext_s
let extend_high_s = extend Lib.List.drop ext_s
let extend_low_u = extend Lib.List.take ext_u
let extend_high_u = extend Lib.List.drop ext_u

let dot_i16x8_s x y =
let xs = Rep.to_i16x8 x in
Expand All @@ -492,31 +492,34 @@ struct
| _, _ -> assert false
in Rep.of_i32x4 (dot xs ys)

let extmul_low_s x y = I32x4.mul (widen_low_s x) (widen_low_s y)
let extmul_high_s x y = I32x4.mul (widen_high_s x) (widen_high_s y)
let extmul_low_u x y = I32x4.mul (widen_low_u x) (widen_low_u y)
let extmul_high_u x y = I32x4.mul (widen_high_u x) (widen_high_u y)
let extmul_low_s x y = I32x4.mul (extend_low_s x) (extend_low_s y)
let extmul_high_s x y = I32x4.mul (extend_high_s x) (extend_high_s y)
let extmul_low_u x y = I32x4.mul (extend_low_u x) (extend_low_u y)
let extmul_high_u x y = I32x4.mul (extend_high_u x) (extend_high_u y)

let extadd ext x y = Int32.add (ext x) (ext y)
let extadd_pairwise_s x = Rep.of_i32x4 (Lib.List.pairwise (extadd ext_s) (Rep.to_i16x8 x))
let extadd_pairwise_u x = Rep.of_i32x4 (Lib.List.pairwise (extadd ext_u) (Rep.to_i16x8 x))
end

module I64x2_convert = struct
let widen take_or_drop mask x =
let ext_s = Int64.logand 0xffffffffffffffffL
let ext_u = Int64.logand 0xffffffffL

let extend take_or_drop ext x =
Rep.of_i64x2
(List.map
(fun i32 -> Int64.(logand mask (of_int32 i32)))
(fun i32 -> ext (Int64.of_int32 i32))
(take_or_drop 2 (Rep.to_i32x4 x)))
let widen_low_s = widen Lib.List.take 0xffffffffffffffffL
let widen_high_s = widen Lib.List.drop 0xffffffffffffffffL
let widen_low_u = widen Lib.List.take 0xffffffffL
let widen_high_u = widen Lib.List.drop 0xffffffffL

let extmul_low_s x y = I64x2.mul (widen_low_s x) (widen_low_s y)
let extmul_high_s x y = I64x2.mul (widen_high_s x) (widen_high_s y)
let extmul_low_u x y = I64x2.mul (widen_low_u x) (widen_low_u y)
let extmul_high_u x y = I64x2.mul (widen_high_u x) (widen_high_u y)
let extend_low_s = extend Lib.List.take ext_s
let extend_high_s = extend Lib.List.drop ext_s
let extend_low_u = extend Lib.List.take ext_u
let extend_high_u = extend Lib.List.drop ext_u

let extmul_low_s x y = I64x2.mul (extend_low_s x) (extend_low_s y)
let extmul_high_s x y = I64x2.mul (extend_high_s x) (extend_high_s y)
let extmul_low_u x y = I64x2.mul (extend_low_u x) (extend_low_u y)
let extmul_high_u x y = I64x2.mul (extend_high_u x) (extend_high_u y)
end

module F32x4_convert = struct
Expand Down
12 changes: 6 additions & 6 deletions interpreter/runtime/memory.ml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ let load_simd_packed pack_size simd_load mem a o t =
Bytes.set_int64_le b 0 x;
let v = V128.of_bits (Bytes.to_string b) in
match pack_size, simd_load with
| Pack64, Pack8x8 SX -> V128.I16x8_convert.widen_low_s v
| Pack64, Pack8x8 ZX -> V128.I16x8_convert.widen_low_u v
| Pack64, Pack16x4 SX -> V128.I32x4_convert.widen_low_s v
| Pack64, Pack16x4 ZX -> V128.I32x4_convert.widen_low_u v
| Pack64, Pack32x2 SX -> V128.I64x2_convert.widen_low_s v
| Pack64, Pack32x2 ZX -> V128.I64x2_convert.widen_low_u v
| Pack64, Pack8x8 SX -> V128.I16x8_convert.extend_low_s v
| Pack64, Pack8x8 ZX -> V128.I16x8_convert.extend_low_u v
| Pack64, Pack16x4 SX -> V128.I32x4_convert.extend_low_s v
| Pack64, Pack16x4 ZX -> V128.I32x4_convert.extend_low_u v
| Pack64, Pack32x2 SX -> V128.I64x2_convert.extend_low_s v
| Pack64, Pack32x2 ZX -> V128.I64x2_convert.extend_low_u v
| Pack8, PackSplat -> V128.I8x16.splat (I8.of_int_s (Int64.to_int x))
| Pack16, PackSplat -> V128.I16x8.splat (I16.of_int_s (Int64.to_int x))
| Pack32, PackSplat -> V128.I32x4.splat (I32.of_int_s (Int64.to_int x))
Expand Down
2 changes: 1 addition & 1 deletion interpreter/syntax/ast.ml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ end
module SimdOp =
struct
type iunop = Abs | Neg | TruncSatF32x4S | TruncSatF32x4U
| WidenLowS | WidenLowU | WidenHighS | WidenHighU
| ExtendLowS | ExtendLowU | ExtendHighS | ExtendHighU
| Popcnt | TruncSatF64x2SZero | TruncSatF64x2UZero
| ExtAddPairwiseS | ExtAddPairwiseU
type ibinop = Add | Sub | MinS | MinU | MaxS | MaxU | Mul | AvgrU
Expand Down
24 changes: 12 additions & 12 deletions interpreter/syntax/operators.ml
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ let i8x16_bitmask = SimdBitmask Simd.I8x16
let i8x16_all_true = Test (V128 V128Op.(I8x16 AllTrue))
let i8x16_narrow_i16x8_s = Binary (V128 V128Op.(I8x16 NarrowS))
let i8x16_narrow_i16x8_u = Binary (V128 V128Op.(I8x16 NarrowU))
let i16x8_widen_low_i8x16_s = Unary (V128 V128Op.(I16x8 WidenLowS))
let i16x8_widen_high_i8x16_s = Unary (V128 V128Op.(I16x8 WidenHighS))
let i16x8_widen_low_i8x16_u = Unary (V128 V128Op.(I16x8 WidenLowU))
let i16x8_widen_high_i8x16_u = Unary (V128 V128Op.(I16x8 WidenHighU))
let i16x8_extend_low_i8x16_s = Unary (V128 V128Op.(I16x8 ExtendLowS))
let i16x8_extend_high_i8x16_s = Unary (V128 V128Op.(I16x8 ExtendHighS))
let i16x8_extend_low_i8x16_u = Unary (V128 V128Op.(I16x8 ExtendLowU))
let i16x8_extend_high_i8x16_u = Unary (V128 V128Op.(I16x8 ExtendHighU))
let i8x16_shl = SimdShift V128Op.(I8x16 Shl)
let i8x16_shr_s = SimdShift V128Op.(I8x16 ShrS)
let i8x16_shr_u = SimdShift V128Op.(I8x16 ShrU)
Expand Down Expand Up @@ -375,10 +375,10 @@ let i32x4_abs = Unary (V128 V128Op.(I32x4 Abs))
let i32x4_neg = Unary (V128 V128Op.(I32x4 Neg))
let i32x4_bitmask = SimdBitmask Simd.I32x4
let i32x4_all_true = Test (V128 V128Op.(I32x4 AllTrue))
let i32x4_widen_low_i16x8_s = Unary (V128 V128Op.(I32x4 WidenLowS))
let i32x4_widen_high_i16x8_s = Unary (V128 V128Op.(I32x4 WidenHighS))
let i32x4_widen_low_i16x8_u = Unary (V128 V128Op.(I32x4 WidenLowU))
let i32x4_widen_high_i16x8_u = Unary (V128 V128Op.(I32x4 WidenHighU))
let i32x4_extend_low_i16x8_s = Unary (V128 V128Op.(I32x4 ExtendLowS))
let i32x4_extend_high_i16x8_s = Unary (V128 V128Op.(I32x4 ExtendHighS))
let i32x4_extend_low_i16x8_u = Unary (V128 V128Op.(I32x4 ExtendLowU))
let i32x4_extend_high_i16x8_u = Unary (V128 V128Op.(I32x4 ExtendHighU))
let i32x4_shl = SimdShift V128Op.(I32x4 Shl)
let i32x4_shr_s = SimdShift V128Op.(I32x4 ShrS)
let i32x4_shr_u = SimdShift V128Op.(I32x4 ShrU)
Expand All @@ -404,10 +404,10 @@ let i32x4_extadd_pairwise_i16x8_u = Unary (V128 V128Op.(I32x4 ExtAddPairwiseU))
let i64x2_splat = Convert (V128 V128Op.(I64x2 Splat))
let i64x2_extract_lane imm = SimdExtract (V128Op.I64x2 (ZX, imm))
let i64x2_replace_lane imm = SimdReplace (V128Op.I64x2 imm)
let i64x2_widen_low_i32x4_s = Unary (V128 V128Op.(I64x2 WidenLowS))
let i64x2_widen_high_i32x4_s = Unary (V128 V128Op.(I64x2 WidenHighS))
let i64x2_widen_low_i32x4_u = Unary (V128 V128Op.(I64x2 WidenLowU))
let i64x2_widen_high_i32x4_u = Unary (V128 V128Op.(I64x2 WidenHighU))
let i64x2_extend_low_i32x4_s = Unary (V128 V128Op.(I64x2 ExtendLowS))
let i64x2_extend_high_i32x4_s = Unary (V128 V128Op.(I64x2 ExtendHighS))
let i64x2_extend_low_i32x4_u = Unary (V128 V128Op.(I64x2 ExtendLowU))
let i64x2_extend_high_i32x4_u = Unary (V128 V128Op.(I64x2 ExtendHighU))
let i64x2_eq = Binary (V128 V128Op.(I64x2 Eq))
let i64x2_ne = Binary (V128 V128Op.(I64x2 Ne))
let i64x2_lt_s = Binary (V128 V128Op.(I64x2 LtS))
Expand Down
24 changes: 12 additions & 12 deletions interpreter/text/arrange.ml
Original file line number Diff line number Diff line change
Expand Up @@ -206,18 +206,18 @@ struct
| I8x16 Popcnt -> "i8x16.popcnt"
| I16x8 Abs -> "i16x8.abs"
| I16x8 Neg -> "i16x8.neg"
| I16x8 WidenLowS -> "i16x8.widen_low_i8x16_s"
| I16x8 WidenHighS -> "i16x8.widen_high_i8x16_s"
| I16x8 WidenLowU -> "i16x8.widen_low_i8x16_u"
| I16x8 WidenHighU -> "i16x8.widen_high_i8x16_u"
| I16x8 ExtendLowS -> "i16x8.extend_low_i8x16_s"
| I16x8 ExtendHighS -> "i16x8.extend_high_i8x16_s"
| I16x8 ExtendLowU -> "i16x8.extend_low_i8x16_u"
| I16x8 ExtendHighU -> "i16x8.extend_high_i8x16_u"
| I16x8 ExtAddPairwiseS -> "i16x8.extadd_pairwise_i8x16_s"
| I16x8 ExtAddPairwiseU -> "i16x8.extadd_pairwise_i8x16_u"
| I32x4 Abs -> "i32x4.abs"
| I32x4 Neg -> "i32x4.neg"
| I32x4 WidenLowS -> "i32x4.widen_low_i16x8_s"
| I32x4 WidenHighS -> "i32x4.widen_high_i16x8_s"
| I32x4 WidenLowU -> "i32x4.widen_low_i16x8_u"
| I32x4 WidenHighU -> "i32x4.widen_high_i16x8_u"
| I32x4 ExtendLowS -> "i32x4.extend_low_i16x8_s"
| I32x4 ExtendHighS -> "i32x4.extend_high_i16x8_s"
| I32x4 ExtendLowU -> "i32x4.extend_low_i16x8_u"
| I32x4 ExtendHighU -> "i32x4.extend_high_i16x8_u"
| I32x4 TruncSatF32x4S -> "i32x4.trunc_sat_f32x4_s"
| I32x4 TruncSatF32x4U -> "i32x4.trunc_sat_f32x4_u"
| I32x4 TruncSatF64x2SZero -> "i32x4.trunc_sat_f64x2_s_zero"
Expand All @@ -226,10 +226,10 @@ struct
| I32x4 ExtAddPairwiseU -> "i32x4.extadd_pairwise_i16x8_u"
| I64x2 Abs -> "i64x2.abs"
| I64x2 Neg -> "i64x2.neg"
| I64x2 WidenLowS -> "i64x2.widen_low_i32x4_s"
| I64x2 WidenHighS -> "i64x2.widen_high_i32x4_s"
| I64x2 WidenLowU -> "i64x2.widen_low_i32x4_u"
| I64x2 WidenHighU -> "i64x2.widen_high_i32x4_u"
| I64x2 ExtendLowS -> "i64x2.extend_low_i32x4_s"
| I64x2 ExtendHighS -> "i64x2.extend_high_i32x4_s"
| I64x2 ExtendLowU -> "i64x2.extend_low_i32x4_u"
| I64x2 ExtendHighU -> "i64x2.extend_high_i32x4_u"
| F32x4 Ceil -> "f32x4.ceil"
| F32x4 Floor -> "f32x4.floor"
| F32x4 Trunc -> "f32x4.trunc"
Expand Down
Loading

0 comments on commit bc618a3

Please sign in to comment.