1 /* SPDX-License-Identifier: GPL-2.0 */
5 .section .text..SHmedia32,"ax"
9 /* clobbered: r1,r18,r19,r20,r21,r25,tr0 */
18 shlld r5, r1, r25 /* normalize; [-2 ..1, 1..2) in s2.62 */
19 shari r25, 58, r21 /* extract 5(6) bit index (s2.4 with hole -1..1) */
21 ldx.ub r20, r21, r19 /* u0.8 */
22 shari r25, 32, r25 /* normalize to s2.30 */
24 muls.l r25, r19, r19 /* s2.38 */
25 ldx.w r20, r21, r21 /* s2.14 */
27 shari r19, 24, r19 /* truncate to s2.14 */
28 sub r21, r19, r19 /* some 11 bit inverse in s1.14 */
29 muls.l r19, r19, r21 /* u0.28 */
32 muls.l r25, r21, r18 /* s2.58 */
33 shlli r19, 45, r19 /* multiply by two and convert to s2.58 */
36 shari r18, 28, r18 /* some 22 bit inverse in s1.30 */
37 muls.l r18, r25, r0 /* s2.60 */
38 muls.l r18, r4, r25 /* s32.30 */
40 shari r0, 16, r19 /* s-16.44 */
41 muls.l r19, r18, r19 /* s-16.74 */
43 shari r4, 14, r18 /* s19.-14 */
44 shari r19, 30, r19 /* s-16.44 */
45 muls.l r19, r18, r19 /* s15.30 */
46 xor r21, r0, r21 /* You could also use the constant 1 << 27. */
53 /* This table has been generated by divtab.c .
54 Defects for bias -330:
55 Max defect: 6.081536e-07 at -1.000000e+00
56 Min defect: 2.849516e-08 at 1.030651e+00
57 Max 2nd step defect: 9.606539e-12 at -1.000000e+00
58 Min 2nd step defect: 0.000000e+00 at 0.000000e+00
59 Defect at 1: 1.238659e-07
60 Defect at -2: 1.061708e-07 */
63 .type __div_table,@object
65 /* negative division constants */
82 /* negative division factors */
103 /* positive division factors */
120 /* positive division constants */