Debian Codegraph @

arch/x86_64/rsp/vmul.h

raw symbols SCIP
1 //cxx . . $ `<file>/arch/x86_64/rsp/vmul.h`/
2 // arch/x86_64/rsp/vmul.h
3 //
4 // This file is subject to the terms and conditions defined in
5 // 'LICENSE', which is part of this source code package.
6 //
7
8 //
9 // TODO: CHECK ME.
10 //
11
12 static inline __m128icxx . . $ __m128i# rsp_vmulf_vmulucxx . . $ rsp_vmulf_vmulu(3a150aa905e39abd).(uint32_tcxx . . $ uint32_t# iw, __m128icxx . . $ __m128i# vs, __m128icxx . . $ __m128i# vt,
13 __m128icxx . . $ __m128i# zero, __m128icxx . . $ __m128i# *acc_lo, __m128icxx . . $ __m128i# *acc_md, __m128icxx . . $ __m128i# *acc_hi) {
14 __m128icxx . . $ __m128i# lo, hi, round, sign1, sign2, eq, neq, neg;
15
16 lo = _mm_mullo_epi16cxx . . $ _mm_mullo_epi16(e79ab442e937dade).(vs, vt);
17 round = _mm_cmpeq_epi16cxx . . $ _mm_cmpeq_epi16(e79ab442e937dade).(zero, zero);
18 sign1 = _mm_srli_epi16cxx . . $ _mm_srli_epi16(8c21f12da5b7f84d).(lo, 15);
19 lo = _mm_add_epi16cxx . . $ _mm_add_epi16(e79ab442e937dade).(lo, lo);
20 round = _mm_slli_epi16cxx . . $ _mm_slli_epi16(8c21f12da5b7f84d).(round, 15);
21 hi = _mm_mulhi_epi16cxx . . $ _mm_mulhi_epi16(e79ab442e937dade).(vs, vt);
22 sign2 = _mm_srli_epi16cxx . . $ _mm_srli_epi16(8c21f12da5b7f84d).(lo, 15);
23 *acc_lo = _mm_add_epi16cxx . . $ _mm_add_epi16(e79ab442e937dade).(round, lo);
24 sign1 = _mm_add_epi16cxx . . $ _mm_add_epi16(e79ab442e937dade).(sign1, sign2);
25
26 hi = _mm_slli_epi16cxx . . $ _mm_slli_epi16(8c21f12da5b7f84d).(hi, 1);
27 neq = eq = _mm_cmpeq_epi16cxx . . $ _mm_cmpeq_epi16(e79ab442e937dade).(vs, vt);
28 *acc_md = _mm_add_epi16cxx . . $ _mm_add_epi16(e79ab442e937dade).(hi, sign1);
29
30 neg = _mm_srai_epi16cxx . . $ _mm_srai_epi16(8c21f12da5b7f84d).(*acc_md, 15);
31
32 // VMULU
33 if (iw & 0x1) {
34 *acc_hi = _mm_andnot_si128cxx . . $ _mm_andnot_si128(e79ab442e937dade).(eq, neg);
35 hi =_mm_or_si128cxx . . $ _mm_or_si128(e79ab442e937dade).(*acc_md, neg);
36 return _mm_andnot_si128cxx . . $ _mm_andnot_si128(e79ab442e937dade).(*acc_hi, hi);
37 }
38
39 // VMULF
40 else {
41 eq = _mm_and_si128cxx . . $ _mm_and_si128(e79ab442e937dade).(eq, neg);
42 *acc_hi = _mm_andnot_si128cxx . . $ _mm_andnot_si128(e79ab442e937dade).(neq, neg);
43 return _mm_add_epi16cxx . . $ _mm_add_epi16(e79ab442e937dade).(*acc_md, eq);
44 }
45 }
46