@@ -160,8 +160,7 @@ impl Simd for WasmSimd128 {
160160 }
161161 #[ inline( always) ]
162162 fn not_i8x16 ( self , a : i8x16 < Self > ) -> i8x16 < Self > {
163- /// TODO: If v128 is used, we need to reinterpret it.
164- todo ! ( )
163+ v128_not ( a. into ( ) ) . simd_into ( self )
165164 }
166165 #[ inline( always) ]
167166 fn add_i8x16 ( self , a : i8x16 < Self > , b : i8x16 < Self > ) -> i8x16 < Self > {
@@ -180,18 +179,15 @@ impl Simd for WasmSimd128 {
180179 }
181180 #[ inline( always) ]
182181 fn and_i8x16 ( self , a : i8x16 < Self > , b : i8x16 < Self > ) -> i8x16 < Self > {
183- /// TODO: If v128 is used we need to reinterpret it accurately...
184- todo ! ( )
182+ v128_and ( a. into ( ) , b. into ( ) ) . simd_into ( self )
185183 }
186184 #[ inline( always) ]
187185 fn or_i8x16 ( self , a : i8x16 < Self > , b : i8x16 < Self > ) -> i8x16 < Self > {
188- /// TODO: If v128 is used we need to reinterpret it accurately...
189- todo ! ( )
186+ v128_or ( a. into ( ) , b. into ( ) ) . simd_into ( self )
190187 }
191188 #[ inline( always) ]
192189 fn xor_i8x16 ( self , a : i8x16 < Self > , b : i8x16 < Self > ) -> i8x16 < Self > {
193- /// TODO: If v128 is used we need to reinterpret it accurately...
194- todo ! ( )
190+ v128_xor ( a. into ( ) , b. into ( ) ) . simd_into ( self )
195191 }
196192 #[ inline( always) ]
197193 fn shr_i8x16 ( self , a : i8x16 < Self > , shift : u32 ) -> i8x16 < Self > {
@@ -254,8 +250,7 @@ impl Simd for WasmSimd128 {
254250 }
255251 #[ inline( always) ]
256252 fn not_u8x16 ( self , a : u8x16 < Self > ) -> u8x16 < Self > {
257- /// TODO: If v128 is used, we need to reinterpret it.
258- todo ! ( )
253+ v128_not ( a. into ( ) ) . simd_into ( self )
259254 }
260255 #[ inline( always) ]
261256 fn add_u8x16 ( self , a : u8x16 < Self > , b : u8x16 < Self > ) -> u8x16 < Self > {
@@ -274,18 +269,15 @@ impl Simd for WasmSimd128 {
274269 }
275270 #[ inline( always) ]
276271 fn and_u8x16 ( self , a : u8x16 < Self > , b : u8x16 < Self > ) -> u8x16 < Self > {
277- /// TODO: If v128 is used we need to reinterpret it accurately...
278- todo ! ( )
272+ v128_and ( a. into ( ) , b. into ( ) ) . simd_into ( self )
279273 }
280274 #[ inline( always) ]
281275 fn or_u8x16 ( self , a : u8x16 < Self > , b : u8x16 < Self > ) -> u8x16 < Self > {
282- /// TODO: If v128 is used we need to reinterpret it accurately...
283- todo ! ( )
276+ v128_or ( a. into ( ) , b. into ( ) ) . simd_into ( self )
284277 }
285278 #[ inline( always) ]
286279 fn xor_u8x16 ( self , a : u8x16 < Self > , b : u8x16 < Self > ) -> u8x16 < Self > {
287- /// TODO: If v128 is used we need to reinterpret it accurately...
288- todo ! ( )
280+ v128_xor ( a. into ( ) , b. into ( ) ) . simd_into ( self )
289281 }
290282 #[ inline( always) ]
291283 fn shr_u8x16 ( self , a : u8x16 < Self > , shift : u32 ) -> u8x16 < Self > {
@@ -348,23 +340,19 @@ impl Simd for WasmSimd128 {
348340 }
349341 #[ inline( always) ]
350342 fn not_mask8x16 ( self , a : mask8x16 < Self > ) -> mask8x16 < Self > {
351- /// TODO: If v128 is used, we need to reinterpret it.
352- todo ! ( )
343+ v128_not ( a. into ( ) ) . simd_into ( self )
353344 }
354345 #[ inline( always) ]
355346 fn and_mask8x16 ( self , a : mask8x16 < Self > , b : mask8x16 < Self > ) -> mask8x16 < Self > {
356- /// TODO: If v128 is used we need to reinterpret it accurately...
357- todo ! ( )
347+ v128_and ( a. into ( ) , b. into ( ) ) . simd_into ( self )
358348 }
359349 #[ inline( always) ]
360350 fn or_mask8x16 ( self , a : mask8x16 < Self > , b : mask8x16 < Self > ) -> mask8x16 < Self > {
361- /// TODO: If v128 is used we need to reinterpret it accurately...
362- todo ! ( )
351+ v128_or ( a. into ( ) , b. into ( ) ) . simd_into ( self )
363352 }
364353 #[ inline( always) ]
365354 fn xor_mask8x16 ( self , a : mask8x16 < Self > , b : mask8x16 < Self > ) -> mask8x16 < Self > {
366- /// TODO: If v128 is used we need to reinterpret it accurately...
367- todo ! ( )
355+ v128_xor ( a. into ( ) , b. into ( ) ) . simd_into ( self )
368356 }
369357 #[ inline( always) ]
370358 fn select_mask8x16 (
@@ -392,8 +380,7 @@ impl Simd for WasmSimd128 {
392380 }
393381 #[ inline( always) ]
394382 fn not_i16x8 ( self , a : i16x8 < Self > ) -> i16x8 < Self > {
395- /// TODO: If v128 is used, we need to reinterpret it.
396- todo ! ( )
383+ v128_not ( a. into ( ) ) . simd_into ( self )
397384 }
398385 #[ inline( always) ]
399386 fn add_i16x8 ( self , a : i16x8 < Self > , b : i16x8 < Self > ) -> i16x8 < Self > {
@@ -409,18 +396,15 @@ impl Simd for WasmSimd128 {
409396 }
410397 #[ inline( always) ]
411398 fn and_i16x8 ( self , a : i16x8 < Self > , b : i16x8 < Self > ) -> i16x8 < Self > {
412- /// TODO: If v128 is used we need to reinterpret it accurately...
413- todo ! ( )
399+ v128_and ( a. into ( ) , b. into ( ) ) . simd_into ( self )
414400 }
415401 #[ inline( always) ]
416402 fn or_i16x8 ( self , a : i16x8 < Self > , b : i16x8 < Self > ) -> i16x8 < Self > {
417- /// TODO: If v128 is used we need to reinterpret it accurately...
418- todo ! ( )
403+ v128_or ( a. into ( ) , b. into ( ) ) . simd_into ( self )
419404 }
420405 #[ inline( always) ]
421406 fn xor_i16x8 ( self , a : i16x8 < Self > , b : i16x8 < Self > ) -> i16x8 < Self > {
422- /// TODO: If v128 is used we need to reinterpret it accurately...
423- todo ! ( )
407+ v128_xor ( a. into ( ) , b. into ( ) ) . simd_into ( self )
424408 }
425409 #[ inline( always) ]
426410 fn shr_i16x8 ( self , a : i16x8 < Self > , shift : u32 ) -> i16x8 < Self > {
@@ -483,8 +467,7 @@ impl Simd for WasmSimd128 {
483467 }
484468 #[ inline( always) ]
485469 fn not_u16x8 ( self , a : u16x8 < Self > ) -> u16x8 < Self > {
486- /// TODO: If v128 is used, we need to reinterpret it.
487- todo ! ( )
470+ v128_not ( a. into ( ) ) . simd_into ( self )
488471 }
489472 #[ inline( always) ]
490473 fn add_u16x8 ( self , a : u16x8 < Self > , b : u16x8 < Self > ) -> u16x8 < Self > {
@@ -500,18 +483,15 @@ impl Simd for WasmSimd128 {
500483 }
501484 #[ inline( always) ]
502485 fn and_u16x8 ( self , a : u16x8 < Self > , b : u16x8 < Self > ) -> u16x8 < Self > {
503- /// TODO: If v128 is used we need to reinterpret it accurately...
504- todo ! ( )
486+ v128_and ( a. into ( ) , b. into ( ) ) . simd_into ( self )
505487 }
506488 #[ inline( always) ]
507489 fn or_u16x8 ( self , a : u16x8 < Self > , b : u16x8 < Self > ) -> u16x8 < Self > {
508- /// TODO: If v128 is used we need to reinterpret it accurately...
509- todo ! ( )
490+ v128_or ( a. into ( ) , b. into ( ) ) . simd_into ( self )
510491 }
511492 #[ inline( always) ]
512493 fn xor_u16x8 ( self , a : u16x8 < Self > , b : u16x8 < Self > ) -> u16x8 < Self > {
513- /// TODO: If v128 is used we need to reinterpret it accurately...
514- todo ! ( )
494+ v128_xor ( a. into ( ) , b. into ( ) ) . simd_into ( self )
515495 }
516496 #[ inline( always) ]
517497 fn shr_u16x8 ( self , a : u16x8 < Self > , shift : u32 ) -> u16x8 < Self > {
@@ -574,23 +554,19 @@ impl Simd for WasmSimd128 {
574554 }
575555 #[ inline( always) ]
576556 fn not_mask16x8 ( self , a : mask16x8 < Self > ) -> mask16x8 < Self > {
577- /// TODO: If v128 is used, we need to reinterpret it.
578- todo ! ( )
557+ v128_not ( a. into ( ) ) . simd_into ( self )
579558 }
580559 #[ inline( always) ]
581560 fn and_mask16x8 ( self , a : mask16x8 < Self > , b : mask16x8 < Self > ) -> mask16x8 < Self > {
582- /// TODO: If v128 is used we need to reinterpret it accurately...
583- todo ! ( )
561+ v128_and ( a. into ( ) , b. into ( ) ) . simd_into ( self )
584562 }
585563 #[ inline( always) ]
586564 fn or_mask16x8 ( self , a : mask16x8 < Self > , b : mask16x8 < Self > ) -> mask16x8 < Self > {
587- /// TODO: If v128 is used we need to reinterpret it accurately...
588- todo ! ( )
565+ v128_or ( a. into ( ) , b. into ( ) ) . simd_into ( self )
589566 }
590567 #[ inline( always) ]
591568 fn xor_mask16x8 ( self , a : mask16x8 < Self > , b : mask16x8 < Self > ) -> mask16x8 < Self > {
592- /// TODO: If v128 is used we need to reinterpret it accurately...
593- todo ! ( )
569+ v128_xor ( a. into ( ) , b. into ( ) ) . simd_into ( self )
594570 }
595571 #[ inline( always) ]
596572 fn select_mask16x8 (
@@ -618,8 +594,7 @@ impl Simd for WasmSimd128 {
618594 }
619595 #[ inline( always) ]
620596 fn not_i32x4 ( self , a : i32x4 < Self > ) -> i32x4 < Self > {
621- /// TODO: If v128 is used, we need to reinterpret it.
622- todo ! ( )
597+ v128_not ( a. into ( ) ) . simd_into ( self )
623598 }
624599 #[ inline( always) ]
625600 fn add_i32x4 ( self , a : i32x4 < Self > , b : i32x4 < Self > ) -> i32x4 < Self > {
@@ -635,18 +610,15 @@ impl Simd for WasmSimd128 {
635610 }
636611 #[ inline( always) ]
637612 fn and_i32x4 ( self , a : i32x4 < Self > , b : i32x4 < Self > ) -> i32x4 < Self > {
638- /// TODO: If v128 is used we need to reinterpret it accurately...
639- todo ! ( )
613+ v128_and ( a. into ( ) , b. into ( ) ) . simd_into ( self )
640614 }
641615 #[ inline( always) ]
642616 fn or_i32x4 ( self , a : i32x4 < Self > , b : i32x4 < Self > ) -> i32x4 < Self > {
643- /// TODO: If v128 is used we need to reinterpret it accurately...
644- todo ! ( )
617+ v128_or ( a. into ( ) , b. into ( ) ) . simd_into ( self )
645618 }
646619 #[ inline( always) ]
647620 fn xor_i32x4 ( self , a : i32x4 < Self > , b : i32x4 < Self > ) -> i32x4 < Self > {
648- /// TODO: If v128 is used we need to reinterpret it accurately...
649- todo ! ( )
621+ v128_xor ( a. into ( ) , b. into ( ) ) . simd_into ( self )
650622 }
651623 #[ inline( always) ]
652624 fn shr_i32x4 ( self , a : i32x4 < Self > , shift : u32 ) -> i32x4 < Self > {
@@ -709,8 +681,7 @@ impl Simd for WasmSimd128 {
709681 }
710682 #[ inline( always) ]
711683 fn not_u32x4 ( self , a : u32x4 < Self > ) -> u32x4 < Self > {
712- /// TODO: If v128 is used, we need to reinterpret it.
713- todo ! ( )
684+ v128_not ( a. into ( ) ) . simd_into ( self )
714685 }
715686 #[ inline( always) ]
716687 fn add_u32x4 ( self , a : u32x4 < Self > , b : u32x4 < Self > ) -> u32x4 < Self > {
@@ -726,18 +697,15 @@ impl Simd for WasmSimd128 {
726697 }
727698 #[ inline( always) ]
728699 fn and_u32x4 ( self , a : u32x4 < Self > , b : u32x4 < Self > ) -> u32x4 < Self > {
729- /// TODO: If v128 is used we need to reinterpret it accurately...
730- todo ! ( )
700+ v128_and ( a. into ( ) , b. into ( ) ) . simd_into ( self )
731701 }
732702 #[ inline( always) ]
733703 fn or_u32x4 ( self , a : u32x4 < Self > , b : u32x4 < Self > ) -> u32x4 < Self > {
734- /// TODO: If v128 is used we need to reinterpret it accurately...
735- todo ! ( )
704+ v128_or ( a. into ( ) , b. into ( ) ) . simd_into ( self )
736705 }
737706 #[ inline( always) ]
738707 fn xor_u32x4 ( self , a : u32x4 < Self > , b : u32x4 < Self > ) -> u32x4 < Self > {
739- /// TODO: If v128 is used we need to reinterpret it accurately...
740- todo ! ( )
708+ v128_xor ( a. into ( ) , b. into ( ) ) . simd_into ( self )
741709 }
742710 #[ inline( always) ]
743711 fn shr_u32x4 ( self , a : u32x4 < Self > , shift : u32 ) -> u32x4 < Self > {
@@ -800,23 +768,19 @@ impl Simd for WasmSimd128 {
800768 }
801769 #[ inline( always) ]
802770 fn not_mask32x4 ( self , a : mask32x4 < Self > ) -> mask32x4 < Self > {
803- /// TODO: If v128 is used, we need to reinterpret it.
804- todo ! ( )
771+ v128_not ( a. into ( ) ) . simd_into ( self )
805772 }
806773 #[ inline( always) ]
807774 fn and_mask32x4 ( self , a : mask32x4 < Self > , b : mask32x4 < Self > ) -> mask32x4 < Self > {
808- /// TODO: If v128 is used we need to reinterpret it accurately...
809- todo ! ( )
775+ v128_and ( a. into ( ) , b. into ( ) ) . simd_into ( self )
810776 }
811777 #[ inline( always) ]
812778 fn or_mask32x4 ( self , a : mask32x4 < Self > , b : mask32x4 < Self > ) -> mask32x4 < Self > {
813- /// TODO: If v128 is used we need to reinterpret it accurately...
814- todo ! ( )
779+ v128_or ( a. into ( ) , b. into ( ) ) . simd_into ( self )
815780 }
816781 #[ inline( always) ]
817782 fn xor_mask32x4 ( self , a : mask32x4 < Self > , b : mask32x4 < Self > ) -> mask32x4 < Self > {
818- /// TODO: If v128 is used we need to reinterpret it accurately...
819- todo ! ( )
783+ v128_xor ( a. into ( ) , b. into ( ) ) . simd_into ( self )
820784 }
821785 #[ inline( always) ]
822786 fn select_mask32x4 (
0 commit comments