@@ -848,7 +848,7 @@ pub unsafe fn _mm_mullo_epi32(a: i32x4, b: i32x4) -> i32x4 {
848
848
#[ inline( always) ]
849
849
#[ target_feature = "+sse4.1" ]
850
850
#[ cfg_attr( test, assert_instr( mpsadbw, imm8=0 ) ) ]
851
- pub unsafe fn _mm_mpsadbw_epu8 ( a : i8x16 , b : i8x16 , imm8 : u8 ) -> i16x8 {
851
+ pub unsafe fn _mm_mpsadbw_epu8 ( a : u8x16 , b : u8x16 , imm8 : u8 ) -> u16x8 {
852
852
macro_rules! call {
853
853
( $imm8: expr) => { mpsadbw( a, b, $imm8) }
854
854
}
@@ -914,7 +914,7 @@ extern "C" {
914
914
#[ link_name = "llvm.x86.sse41.pmuldq" ]
915
915
fn pmuldq ( a : i32x4 , b : i32x4 ) -> i64x2 ;
916
916
#[ link_name = "llvm.x86.sse41.mpsadbw" ]
917
- fn mpsadbw ( a : i8x16 , b : i8x16 , imm8 : u8 ) -> i16x8 ;
917
+ fn mpsadbw ( a : u8x16 , b : u8x16 , imm8 : u8 ) -> u16x8 ;
918
918
}
919
919
920
920
#[ cfg( test) ]
@@ -1624,26 +1624,26 @@ mod tests {
1624
1624
1625
1625
#[ simd_test = "sse4.1" ]
1626
1626
unsafe fn _mm_mpsadbw_epu8 ( ) {
1627
- let a = i8x16 :: new ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 ) ;
1627
+ let a = u8x16 :: new ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 ) ;
1628
1628
1629
1629
let r = sse41:: _mm_mpsadbw_epu8 ( a, a, 0b000 ) ;
1630
- let e = i16x8 :: new ( 0 , 4 , 8 , 12 , 16 , 20 , 24 , 28 ) ;
1630
+ let e = u16x8 :: new ( 0 , 4 , 8 , 12 , 16 , 20 , 24 , 28 ) ;
1631
1631
assert_eq ! ( r, e) ;
1632
1632
1633
1633
let r = sse41:: _mm_mpsadbw_epu8 ( a, a, 0b001 ) ;
1634
- let e = i16x8 :: new ( 16 , 12 , 8 , 4 , 0 , 4 , 8 , 12 ) ;
1634
+ let e = u16x8 :: new ( 16 , 12 , 8 , 4 , 0 , 4 , 8 , 12 ) ;
1635
1635
assert_eq ! ( r, e) ;
1636
1636
1637
1637
let r = sse41:: _mm_mpsadbw_epu8 ( a, a, 0b100 ) ;
1638
- let e = i16x8 :: new ( 16 , 20 , 24 , 28 , 32 , 36 , 40 , 44 ) ;
1638
+ let e = u16x8 :: new ( 16 , 20 , 24 , 28 , 32 , 36 , 40 , 44 ) ;
1639
1639
assert_eq ! ( r, e) ;
1640
1640
1641
1641
let r = sse41:: _mm_mpsadbw_epu8 ( a, a, 0b101 ) ;
1642
- let e = i16x8 :: new ( 0 , 4 , 8 , 12 , 16 , 20 , 24 , 28 ) ;
1642
+ let e = u16x8 :: new ( 0 , 4 , 8 , 12 , 16 , 20 , 24 , 28 ) ;
1643
1643
assert_eq ! ( r, e) ;
1644
1644
1645
1645
let r = sse41:: _mm_mpsadbw_epu8 ( a, a, 0b111 ) ;
1646
- let e = i16x8 :: new ( 32 , 28 , 24 , 20 , 16 , 12 , 8 , 4 ) ;
1646
+ let e = u16x8 :: new ( 32 , 28 , 24 , 20 , 16 , 12 , 8 , 4 ) ;
1647
1647
assert_eq ! ( r, e) ;
1648
1648
}
1649
1649
}
0 commit comments