blob: 99ee8c5de38b3e5ec4ab3916c810454e980a1e1f [file] [log] [blame]
Robin Getz96f10502009-09-24 14:11:24 +00001/*
2 * Copyright 2007 Analog Devices Inc.
3 *
4 * Licensed under the ADI BSD license or the GPL-2 (or later)
5 */
6
Bryan Wu1394f032007-05-06 14:50:22 -07007.align 2
8.global ___smulsi3_highpart;
9.type ___smulsi3_highpart, STT_FUNC;
10
11#ifdef CONFIG_ARITHMETIC_OPS_L1
12.section .l1.text
13#else
14.text
15#endif
16
17___smulsi3_highpart:
18 R2 = R1.L * R0.L (FU);
19 R3 = R1.H * R0.L (IS,M);
20 R0 = R0.H * R1.H, R1 = R0.H * R1.L (IS,M);
21
22 R1.L = R2.H + R1.L;
23 cc = ac0;
24 R2 = cc;
25
26 R1.L = R1.L + R3.L;
27 cc = ac0;
28 R1 >>>= 16;
29 R3 >>>= 16;
30 R1 = R1 + R3;
31 R1 = R1 + R2;
32 R2 = cc;
33 R1 = R1 + R2;
34
35 R0 = R0 + R1;
36 RTS;
Mike Frysinger51be24c2007-06-11 15:31:30 +080037
38.size ___smulsi3_highpart, .-___smulsi3_highpart