aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/lib/umulsi3_highpart.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/lib/umulsi3_highpart.S')
-rw-r--r--arch/blackfin/lib/umulsi3_highpart.S23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/blackfin/lib/umulsi3_highpart.S b/arch/blackfin/lib/umulsi3_highpart.S
new file mode 100644
index 000000000000..aac8218fb258
--- /dev/null
+++ b/arch/blackfin/lib/umulsi3_highpart.S
@@ -0,0 +1,23 @@
1.align 2
2.global ___umulsi3_highpart;
3.type ___umulsi3_highpart, STT_FUNC;
4
5#ifdef CONFIG_ARITHMETIC_OPS_L1
6.section .l1.text
7#else
8.text
9#endif
10
11___umulsi3_highpart:
12 R2 = R1.H * R0.H, R3 = R1.L * R0.H (FU);
13 R0 = R1.L * R0.L, R1 = R1.H * R0.L (FU);
14 R0 >>= 16;
15 /* Unsigned multiplication has the nice property that we can
16 ignore carry on this first addition. */
17 R0 = R0 + R3;
18 R0 = R0 + R1;
19 cc = ac0;
20 R1 = cc;
21 R1 = PACK(R1.l,R0.h);
22 R0 = R1 + R2;
23 RTS;