File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
crates/intrinsic-test/src/x86 Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,13 @@ int mm512_extract_intrinsic_test_epi64(__m512i m, int lane) {
5353 return mm512_extract(m, 512, 64, lane)
5454}
5555
56+ int mm64_extract_intrinsic_test_epi8(__m64 m, int lane) {
57+ int real_lane_shift = lane / 2;
58+ int real_bit_shift = (lane % 2) * 8;
59+ int result = _mm_extract_pi16(m, lane / 2);
60+ return (result >> real_bit_shift);
61+ }
62+
5663int mm64_extract_intrinsic_test_epi32(__m64 m, int lane) {
5764 int bit_shift_amount = lane * 32;
5865 return _m_to_int(m >> bit_shift_amount);
Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ impl IntrinsicTypeDefinition for X86IntrinsicType {
139139 ( Some ( 16 ) , Some ( 512 ) ) => String :: from ( "_mm512_extract_intrinsic_test_epi16" ) ,
140140 ( Some ( 32 ) , Some ( 512 ) ) => String :: from ( "_mm512_extract_intrinsic_test_epi32" ) ,
141141 ( Some ( 64 ) , Some ( 512 ) ) => String :: from ( "_mm512_extract_intrinsic_test_epi64" ) ,
142+ ( Some ( 8 ) , Some ( 64 ) ) => String :: from ( "mm64_extract_intrinsic_test_epi8" ) ,
142143 ( Some ( 16 ) , Some ( 64 ) ) => String :: from ( "_mm_extract_pi16" ) ,
143144 ( Some ( 32 ) , Some ( 64 ) ) => String :: from ( "mm64_extract_intrinsic_test_epi32" ) ,
144145 _ => unreachable ! (
You can’t perform that action at this time.
0 commit comments