@@ -2551,7 +2551,7 @@ impl OpVisitor for Interpreter<'_> {
2551
2551
let mut a = self . state [ operands. src1 ] . get_i8x16 ( ) ;
2552
2552
let b = self . state [ operands. src2 ] . get_i8x16 ( ) ;
2553
2553
for ( a, b) in a. iter_mut ( ) . zip ( b) {
2554
- * a += b ;
2554
+ * a = a . wrapping_add ( b ) ;
2555
2555
}
2556
2556
self . state [ operands. dst ] . set_i8x16 ( a) ;
2557
2557
ControlFlow :: Continue ( ( ) )
@@ -2561,7 +2561,7 @@ impl OpVisitor for Interpreter<'_> {
2561
2561
let mut a = self . state [ operands. src1 ] . get_i16x8 ( ) ;
2562
2562
let b = self . state [ operands. src2 ] . get_i16x8 ( ) ;
2563
2563
for ( a, b) in a. iter_mut ( ) . zip ( b) {
2564
- * a += b ;
2564
+ * a = a . wrapping_add ( b ) ;
2565
2565
}
2566
2566
self . state [ operands. dst ] . set_i16x8 ( a) ;
2567
2567
ControlFlow :: Continue ( ( ) )
@@ -2571,7 +2571,7 @@ impl OpVisitor for Interpreter<'_> {
2571
2571
let mut a = self . state [ operands. src1 ] . get_i32x4 ( ) ;
2572
2572
let b = self . state [ operands. src2 ] . get_i32x4 ( ) ;
2573
2573
for ( a, b) in a. iter_mut ( ) . zip ( b) {
2574
- * a += b ;
2574
+ * a = a . wrapping_add ( b ) ;
2575
2575
}
2576
2576
self . state [ operands. dst ] . set_i32x4 ( a) ;
2577
2577
ControlFlow :: Continue ( ( ) )
@@ -2581,7 +2581,7 @@ impl OpVisitor for Interpreter<'_> {
2581
2581
let mut a = self . state [ operands. src1 ] . get_i64x2 ( ) ;
2582
2582
let b = self . state [ operands. src2 ] . get_i64x2 ( ) ;
2583
2583
for ( a, b) in a. iter_mut ( ) . zip ( b) {
2584
- * a += b ;
2584
+ * a = a . wrapping_add ( b ) ;
2585
2585
}
2586
2586
self . state [ operands. dst ] . set_i64x2 ( a) ;
2587
2587
ControlFlow :: Continue ( ( ) )
@@ -2695,6 +2695,42 @@ impl OpVisitor for Interpreter<'_> {
2695
2695
self . state [ dst] . set_u128 ( val) ;
2696
2696
ControlFlow :: Continue ( ( ) )
2697
2697
}
2698
+
2699
+ fn vsplatx8 ( & mut self , dst : VReg , src : XReg ) -> ControlFlow < Done > {
2700
+ let val = self . state [ src] . get_u32 ( ) as u8 ;
2701
+ self . state [ dst] . set_u8x16 ( [ val; 16 ] ) ;
2702
+ ControlFlow :: Continue ( ( ) )
2703
+ }
2704
+
2705
+ fn vsplatx16 ( & mut self , dst : VReg , src : XReg ) -> ControlFlow < Done > {
2706
+ let val = self . state [ src] . get_u32 ( ) as u16 ;
2707
+ self . state [ dst] . set_u16x8 ( [ val; 8 ] ) ;
2708
+ ControlFlow :: Continue ( ( ) )
2709
+ }
2710
+
2711
+ fn vsplatx32 ( & mut self , dst : VReg , src : XReg ) -> ControlFlow < Done > {
2712
+ let val = self . state [ src] . get_u32 ( ) ;
2713
+ self . state [ dst] . set_u32x4 ( [ val; 4 ] ) ;
2714
+ ControlFlow :: Continue ( ( ) )
2715
+ }
2716
+
2717
+ fn vsplatx64 ( & mut self , dst : VReg , src : XReg ) -> ControlFlow < Done > {
2718
+ let val = self . state [ src] . get_u64 ( ) ;
2719
+ self . state [ dst] . set_u64x2 ( [ val; 2 ] ) ;
2720
+ ControlFlow :: Continue ( ( ) )
2721
+ }
2722
+
2723
+ fn vsplatf32 ( & mut self , dst : VReg , src : FReg ) -> ControlFlow < Done > {
2724
+ let val = self . state [ src] . get_f32 ( ) ;
2725
+ self . state [ dst] . set_f32x4 ( [ val; 4 ] ) ;
2726
+ ControlFlow :: Continue ( ( ) )
2727
+ }
2728
+
2729
+ fn vsplatf64 ( & mut self , dst : VReg , src : FReg ) -> ControlFlow < Done > {
2730
+ let val = self . state [ src] . get_f64 ( ) ;
2731
+ self . state [ dst] . set_f64x2 ( [ val; 2 ] ) ;
2732
+ ControlFlow :: Continue ( ( ) )
2733
+ }
2698
2734
}
2699
2735
2700
2736
impl ExtendedOpVisitor for Interpreter < ' _ > {
0 commit comments