@@ -2040,6 +2040,8 @@ extern "C" {
2040
2040
fn pminub ( a : __m64 , b : __m64 ) -> __m64 ;
2041
2041
#[ link_name = "llvm.x86.mmx.pmulhu.w" ]
2042
2042
fn pmulhuw ( a : __m64 , b : __m64 ) -> __m64 ;
2043
+ #[ link_name = "llvm.x86.mmx.pmull.w" ]
2044
+ fn pmullw ( a : __m64 , b : __m64 ) -> __m64 ;
2043
2045
#[ link_name = "llvm.x86.mmx.pavg.b" ]
2044
2046
fn pavgb ( a : __m64 , b : __m64 ) -> __m64 ;
2045
2047
#[ link_name = "llvm.x86.mmx.pavg.w" ]
@@ -2157,6 +2159,16 @@ pub unsafe fn _mm_mulhi_pu16(a: __m64, b: __m64) -> __m64 {
2157
2159
pmulhuw ( a, b)
2158
2160
}
2159
2161
2162
+ /// Multiplies packed 16-bit integer values and writes the
2163
+ /// low-order 16 bits of each 32-bit product to the corresponding bits in
2164
+ /// the destination.
2165
+ #[ inline]
2166
+ #[ target_feature( enable = "sse,mmx" ) ]
2167
+ #[ cfg_attr( test, assert_instr( pmullw) ) ]
2168
+ pub unsafe fn _mm_mullo_pi16 ( a : __m64 , b : __m64 ) -> __m64 {
2169
+ pmullw ( a, b)
2170
+ }
2171
+
2160
2172
/// Multiplies packed 16-bit unsigned integer values and writes the
2161
2173
/// high-order 16 bits of each 32-bit product to the corresponding bits in
2162
2174
/// the destination.
@@ -4001,6 +4013,13 @@ mod tests {
4001
4013
assert_eq_m64 ( r, _mm_set1_pi16 ( 15 ) ) ;
4002
4014
}
4003
4015
4016
+ #[ simd_test( enable = "sse,mmx" ) ]
4017
+ unsafe fn test_mm_mullo_pi16 ( ) {
4018
+ let ( a, b) = ( _mm_set1_pi16 ( 1000 ) , _mm_set1_pi16 ( 1001 ) ) ;
4019
+ let r = _mm_mullo_pi16 ( a, b) ;
4020
+ assert_eq_m64 ( r, _mm_set1_pi16 ( 17960 ) ) ;
4021
+ }
4022
+
4004
4023
#[ simd_test( enable = "sse,mmx" ) ]
4005
4024
unsafe fn test_m_pmulhuw ( ) {
4006
4025
let ( a, b) = ( _mm_set1_pi16 ( 1000 ) , _mm_set1_pi16 ( 1001 ) ) ;
0 commit comments