@@ -783,7 +783,7 @@ pub unsafe fn _mm_minpos_epu16(a: u16x8) -> u16x8 {
783
783
#[ inline( always) ]
784
784
#[ target_feature = "+sse4.1" ]
785
785
#[ cfg_attr( test, assert_instr( mpsadbw, imm8=0 ) ) ]
786
- pub unsafe fn _mm_mpsadbw_epu8 ( a : i8x16 , b : i8x16 , imm8 : u8 ) -> i16x8 {
786
+ pub unsafe fn _mm_mpsadbw_epu8 ( a : u8x16 , b : u8x16 , imm8 : u8 ) -> u16x8 {
787
787
macro_rules! call {
788
788
( $imm8: expr) => { mpsadbw( a, b, $imm8) }
789
789
}
@@ -840,7 +840,7 @@ extern "C" {
840
840
#[ link_name = "llvm.x86.sse41.phminposuw" ]
841
841
fn phminposuw ( a : u16x8 ) -> u16x8 ;
842
842
#[ link_name = "llvm.x86.sse41.mpsadbw" ]
843
- fn mpsadbw ( a : i8x16 , b : i8x16 , imm8 : u8 ) -> i16x8 ;
843
+ fn mpsadbw ( a : u8x16 , b : u8x16 , imm8 : u8 ) -> u16x8 ;
844
844
}
845
845
846
846
#[ cfg( test) ]
@@ -1432,26 +1432,26 @@ mod tests {
1432
1432
1433
1433
#[ simd_test = "sse4.1" ]
1434
1434
unsafe fn _mm_mpsadbw_epu8 ( ) {
1435
- let a = i8x16 :: new ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 ) ;
1435
+ let a = u8x16 :: new ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 ) ;
1436
1436
1437
1437
let r = sse41:: _mm_mpsadbw_epu8 ( a, a, 0b000 ) ;
1438
- let e = i16x8 :: new ( 0 , 4 , 8 , 12 , 16 , 20 , 24 , 28 ) ;
1438
+ let e = u16x8 :: new ( 0 , 4 , 8 , 12 , 16 , 20 , 24 , 28 ) ;
1439
1439
assert_eq ! ( r, e) ;
1440
1440
1441
1441
let r = sse41:: _mm_mpsadbw_epu8 ( a, a, 0b001 ) ;
1442
- let e = i16x8 :: new ( 16 , 12 , 8 , 4 , 0 , 4 , 8 , 12 ) ;
1442
+ let e = u16x8 :: new ( 16 , 12 , 8 , 4 , 0 , 4 , 8 , 12 ) ;
1443
1443
assert_eq ! ( r, e) ;
1444
1444
1445
1445
let r = sse41:: _mm_mpsadbw_epu8 ( a, a, 0b100 ) ;
1446
- let e = i16x8 :: new ( 16 , 20 , 24 , 28 , 32 , 36 , 40 , 44 ) ;
1446
+ let e = u16x8 :: new ( 16 , 20 , 24 , 28 , 32 , 36 , 40 , 44 ) ;
1447
1447
assert_eq ! ( r, e) ;
1448
1448
1449
1449
let r = sse41:: _mm_mpsadbw_epu8 ( a, a, 0b101 ) ;
1450
- let e = i16x8 :: new ( 0 , 4 , 8 , 12 , 16 , 20 , 24 , 28 ) ;
1450
+ let e = u16x8 :: new ( 0 , 4 , 8 , 12 , 16 , 20 , 24 , 28 ) ;
1451
1451
assert_eq ! ( r, e) ;
1452
1452
1453
1453
let r = sse41:: _mm_mpsadbw_epu8 ( a, a, 0b111 ) ;
1454
- let e = i16x8 :: new ( 32 , 28 , 24 , 20 , 16 , 12 , 8 , 4 ) ;
1454
+ let e = u16x8 :: new ( 32 , 28 , 24 , 20 , 16 , 12 , 8 , 4 ) ;
1455
1455
assert_eq ! ( r, e) ;
1456
1456
}
1457
1457
}
0 commit comments