@@ -15,7 +15,7 @@ use stdsimd_test::assert_instr;
1515/// Extracts bits in range [`start`, `start` + `length`) from `a` into
1616/// the least significant bits of the result.
1717#[ inline]
18- #[ target_feature( enable = "bmi " ) ]
18+ #[ target_feature( enable = "bmi1 " ) ]
1919#[ cfg_attr( test, assert_instr( bextr) ) ]
2020#[ cfg( not( target_arch = "x86" ) ) ]
2121pub unsafe fn _bextr_u64 ( a : u64 , start : u32 , len : u32 ) -> u64 {
@@ -28,7 +28,7 @@ pub unsafe fn _bextr_u64(a: u64, start: u32, len: u32) -> u64 {
2828/// Bits [7,0] of `control` specify the index to the first bit in the range to
2929/// be extracted, and bits [15,8] specify the length of the range.
3030#[ inline]
31- #[ target_feature( enable = "bmi " ) ]
31+ #[ target_feature( enable = "bmi1 " ) ]
3232#[ cfg_attr( test, assert_instr( bextr) ) ]
3333#[ cfg( not( target_arch = "x86" ) ) ]
3434pub unsafe fn _bextr2_u64 ( a : u64 , control : u64 ) -> u64 {
@@ -37,15 +37,15 @@ pub unsafe fn _bextr2_u64(a: u64, control: u64) -> u64 {
3737
3838/// Bitwise logical `AND` of inverted `a` with `b`.
3939#[ inline]
40- #[ target_feature( enable = "bmi " ) ]
40+ #[ target_feature( enable = "bmi1 " ) ]
4141#[ cfg_attr( test, assert_instr( andn) ) ]
4242pub unsafe fn _andn_u64 ( a : u64 , b : u64 ) -> u64 {
4343 !a & b
4444}
4545
4646/// Extract lowest set isolated bit.
4747#[ inline]
48- #[ target_feature( enable = "bmi " ) ]
48+ #[ target_feature( enable = "bmi1 " ) ]
4949#[ cfg_attr( test, assert_instr( blsi) ) ]
5050#[ cfg( not( target_arch = "x86" ) ) ] // generates lots of instructions
5151pub unsafe fn _blsi_u64 ( x : u64 ) -> u64 {
@@ -54,7 +54,7 @@ pub unsafe fn _blsi_u64(x: u64) -> u64 {
5454
5555/// Get mask up to lowest set bit.
5656#[ inline]
57- #[ target_feature( enable = "bmi " ) ]
57+ #[ target_feature( enable = "bmi1 " ) ]
5858#[ cfg_attr( test, assert_instr( blsmsk) ) ]
5959#[ cfg( not( target_arch = "x86" ) ) ] // generates lots of instructions
6060pub unsafe fn _blsmsk_u64 ( x : u64 ) -> u64 {
@@ -65,7 +65,7 @@ pub unsafe fn _blsmsk_u64(x: u64) -> u64 {
6565///
6666/// If `x` is sets CF.
6767#[ inline]
68- #[ target_feature( enable = "bmi " ) ]
68+ #[ target_feature( enable = "bmi1 " ) ]
6969#[ cfg_attr( test, assert_instr( blsr) ) ]
7070#[ cfg( not( target_arch = "x86" ) ) ] // generates lots of instructions
7171pub unsafe fn _blsr_u64 ( x : u64 ) -> u64 {
@@ -76,7 +76,7 @@ pub unsafe fn _blsr_u64(x: u64) -> u64 {
7676///
7777/// When the source operand is 0, it returns its size in bits.
7878#[ inline]
79- #[ target_feature( enable = "bmi " ) ]
79+ #[ target_feature( enable = "bmi1 " ) ]
8080#[ cfg_attr( test, assert_instr( tzcnt) ) ]
8181pub unsafe fn _tzcnt_u64 ( x : u64 ) -> u64 {
8282 x. trailing_zeros ( ) as u64
@@ -86,7 +86,7 @@ pub unsafe fn _tzcnt_u64(x: u64) -> u64 {
8686///
8787/// When the source operand is 0, it returns its size in bits.
8888#[ inline]
89- #[ target_feature( enable = "bmi " ) ]
89+ #[ target_feature( enable = "bmi1 " ) ]
9090#[ cfg_attr( test, assert_instr( tzcnt) ) ]
9191pub unsafe fn _mm_tzcnt_64 ( x : u64 ) -> i64 {
9292 x. trailing_zeros ( ) as i64
@@ -104,13 +104,13 @@ mod tests {
104104 use coresimd:: x86:: * ;
105105 use coresimd:: x86_64:: * ;
106106
107- #[ simd_test = "bmi " ]
107+ #[ simd_test = "bmi1 " ]
108108 unsafe fn test_bextr_u64 ( ) {
109109 let r = _bextr_u64 ( 0b0101_0000u64 , 4 , 4 ) ;
110110 assert_eq ! ( r, 0b0000_0101u64 ) ;
111111 }
112112
113- #[ simd_test = "bmi " ]
113+ #[ simd_test = "bmi1 " ]
114114 unsafe fn test_andn_u64 ( ) {
115115 assert_eq ! ( _andn_u64( 0 , 0 ) , 0 ) ;
116116 assert_eq ! ( _andn_u64( 0 , 1 ) , 1 ) ;
@@ -133,25 +133,25 @@ mod tests {
133133 assert_eq ! ( r, 0b0001_1101u64 ) ;
134134 }
135135
136- #[ simd_test = "bmi " ]
136+ #[ simd_test = "bmi1 " ]
137137 unsafe fn test_blsi_u64 ( ) {
138138 assert_eq ! ( _blsi_u64( 0b1101_0000u64 ) , 0b0001_0000u64 ) ;
139139 }
140140
141- #[ simd_test = "bmi " ]
141+ #[ simd_test = "bmi1 " ]
142142 unsafe fn test_blsmsk_u64 ( ) {
143143 let r = _blsmsk_u64 ( 0b0011_0000u64 ) ;
144144 assert_eq ! ( r, 0b0001_1111u64 ) ;
145145 }
146146
147- #[ simd_test = "bmi " ]
147+ #[ simd_test = "bmi1 " ]
148148 unsafe fn test_blsr_u64 ( ) {
149149 // TODO: test the behavior when the input is 0
150150 let r = _blsr_u64 ( 0b0011_0000u64 ) ;
151151 assert_eq ! ( r, 0b0010_0000u64 ) ;
152152 }
153153
154- #[ simd_test = "bmi " ]
154+ #[ simd_test = "bmi1 " ]
155155 unsafe fn test_tzcnt_u64 ( ) {
156156 assert_eq ! ( _tzcnt_u64( 0b0000_0001u64 ) , 0u64 ) ;
157157 assert_eq ! ( _tzcnt_u64( 0b0000_0000u64 ) , 64u64 ) ;
0 commit comments