@@ -2574,7 +2574,7 @@ impl OpVisitor for Interpreter<'_> {
2574
2574
let mut a = self . state [ operands. src1 ] . get_i8x16 ( ) ;
2575
2575
let b = self . state [ operands. src2 ] . get_i8x16 ( ) ;
2576
2576
for ( a, b) in a. iter_mut ( ) . zip ( b) {
2577
- * a += b ;
2577
+ * a = a . wrapping_add ( b ) ;
2578
2578
}
2579
2579
self . state [ operands. dst ] . set_i8x16 ( a) ;
2580
2580
ControlFlow :: Continue ( ( ) )
@@ -2584,7 +2584,7 @@ impl OpVisitor for Interpreter<'_> {
2584
2584
let mut a = self . state [ operands. src1 ] . get_i16x8 ( ) ;
2585
2585
let b = self . state [ operands. src2 ] . get_i16x8 ( ) ;
2586
2586
for ( a, b) in a. iter_mut ( ) . zip ( b) {
2587
- * a += b ;
2587
+ * a = a . wrapping_add ( b ) ;
2588
2588
}
2589
2589
self . state [ operands. dst ] . set_i16x8 ( a) ;
2590
2590
ControlFlow :: Continue ( ( ) )
@@ -2594,7 +2594,7 @@ impl OpVisitor for Interpreter<'_> {
2594
2594
let mut a = self . state [ operands. src1 ] . get_i32x4 ( ) ;
2595
2595
let b = self . state [ operands. src2 ] . get_i32x4 ( ) ;
2596
2596
for ( a, b) in a. iter_mut ( ) . zip ( b) {
2597
- * a += b ;
2597
+ * a = a . wrapping_add ( b ) ;
2598
2598
}
2599
2599
self . state [ operands. dst ] . set_i32x4 ( a) ;
2600
2600
ControlFlow :: Continue ( ( ) )
@@ -2604,7 +2604,7 @@ impl OpVisitor for Interpreter<'_> {
2604
2604
let mut a = self . state [ operands. src1 ] . get_i64x2 ( ) ;
2605
2605
let b = self . state [ operands. src2 ] . get_i64x2 ( ) ;
2606
2606
for ( a, b) in a. iter_mut ( ) . zip ( b) {
2607
- * a += b ;
2607
+ * a = a . wrapping_add ( b ) ;
2608
2608
}
2609
2609
self . state [ operands. dst ] . set_i64x2 ( a) ;
2610
2610
ControlFlow :: Continue ( ( ) )
@@ -2718,6 +2718,42 @@ impl OpVisitor for Interpreter<'_> {
2718
2718
self . state [ dst] . set_u128 ( val) ;
2719
2719
ControlFlow :: Continue ( ( ) )
2720
2720
}
2721
+
2722
+ fn vsplatx8 ( & mut self , dst : VReg , src : XReg ) -> ControlFlow < Done > {
2723
+ let val = self . state [ src] . get_u32 ( ) as u8 ;
2724
+ self . state [ dst] . set_u8x16 ( [ val; 16 ] ) ;
2725
+ ControlFlow :: Continue ( ( ) )
2726
+ }
2727
+
2728
+ fn vsplatx16 ( & mut self , dst : VReg , src : XReg ) -> ControlFlow < Done > {
2729
+ let val = self . state [ src] . get_u32 ( ) as u16 ;
2730
+ self . state [ dst] . set_u16x8 ( [ val; 8 ] ) ;
2731
+ ControlFlow :: Continue ( ( ) )
2732
+ }
2733
+
2734
+ fn vsplatx32 ( & mut self , dst : VReg , src : XReg ) -> ControlFlow < Done > {
2735
+ let val = self . state [ src] . get_u32 ( ) ;
2736
+ self . state [ dst] . set_u32x4 ( [ val; 4 ] ) ;
2737
+ ControlFlow :: Continue ( ( ) )
2738
+ }
2739
+
2740
+ fn vsplatx64 ( & mut self , dst : VReg , src : XReg ) -> ControlFlow < Done > {
2741
+ let val = self . state [ src] . get_u64 ( ) ;
2742
+ self . state [ dst] . set_u64x2 ( [ val; 2 ] ) ;
2743
+ ControlFlow :: Continue ( ( ) )
2744
+ }
2745
+
2746
+ fn vsplatf32 ( & mut self , dst : VReg , src : FReg ) -> ControlFlow < Done > {
2747
+ let val = self . state [ src] . get_f32 ( ) ;
2748
+ self . state [ dst] . set_f32x4 ( [ val; 4 ] ) ;
2749
+ ControlFlow :: Continue ( ( ) )
2750
+ }
2751
+
2752
+ fn vsplatf64 ( & mut self , dst : VReg , src : FReg ) -> ControlFlow < Done > {
2753
+ let val = self . state [ src] . get_f64 ( ) ;
2754
+ self . state [ dst] . set_f64x2 ( [ val; 2 ] ) ;
2755
+ ControlFlow :: Continue ( ( ) )
2756
+ }
2721
2757
}
2722
2758
2723
2759
impl ExtendedOpVisitor for Interpreter < ' _ > {
0 commit comments