Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2007 Analog Devices Inc. |
| 3 | * |
| 4 | * Licensed under the ADI BSD license or the GPL-2 (or later) |
| 5 | */ |
| 6 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 7 | .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 Frysinger | 51be24c | 2007-06-11 15:31:30 +0800 | [diff] [blame] | 37 | |
| 38 | .size ___smulsi3_highpart, .-___smulsi3_highpart |