OSDN Git Service

Merge tag 'perf-urgent-2023-09-10' of git://git.kernel.org/pub/scm/linux/kernel/git...
[tomoyo/tomoyo-test1.git] / arch / sparc / lib / multi3.S
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/export.h>
3 #include <linux/linkage.h>
4
5         .text
6         .align  4
7 ENTRY(__multi3) /* %o0 = u, %o1 = v */
8         mov     %o1, %g1
9         srl     %o3, 0, %o4
10         mulx    %o4, %g1, %o1
11         srlx    %g1, 0x20, %g3
12         mulx    %g3, %o4, %g7
13         sllx    %g7, 0x20, %o5
14         srl     %g1, 0, %o4
15         sub     %o1, %o5, %o5
16         srlx    %o5, 0x20, %o5
17         addcc   %g7, %o5, %g7
18         srlx    %o3, 0x20, %o5
19         mulx    %o4, %o5, %o4
20         mulx    %g3, %o5, %o5
21         sethi   %hi(0x80000000), %g3
22         addcc   %g7, %o4, %g7
23         srlx    %g7, 0x20, %g7
24         add     %g3, %g3, %g3
25         movcc   %xcc, %g0, %g3
26         addcc   %o5, %g7, %o5
27         sllx    %o4, 0x20, %o4
28         add     %o1, %o4, %o1
29         add     %o5, %g3, %g2
30         mulx    %g1, %o2, %g1
31         add     %g1, %g2, %g1
32         mulx    %o0, %o3, %o0
33         retl
34          add    %g1, %o0, %o0
35 ENDPROC(__multi3)
36 EXPORT_SYMBOL(__multi3)