diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2016-04-25 10:00:44 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2016-04-25 10:00:44 -0400 |
commit | a1df417e74aa6dae7352dc8cbb0ad471af5b7c69 (patch) | |
tree | c34b2311e37ea31db153c90cb8f4570374d05e78 /linux/arch/blackfin/lib/umulsi3_highpart.S |
initial Olimex linux tree from Daniel, originally Feb 3, 2016
Diffstat (limited to 'linux/arch/blackfin/lib/umulsi3_highpart.S')
-rw-r--r-- | linux/arch/blackfin/lib/umulsi3_highpart.S | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/linux/arch/blackfin/lib/umulsi3_highpart.S b/linux/arch/blackfin/lib/umulsi3_highpart.S new file mode 100644 index 00000000..0dcace96 --- /dev/null +++ b/linux/arch/blackfin/lib/umulsi3_highpart.S @@ -0,0 +1,31 @@ +/* + * Copyright 2007 Analog Devices Inc. + * + * Licensed under the Clear BSD license or the GPL-2 (or later) + */ + +.align 2 +.global ___umulsi3_highpart; +.type ___umulsi3_highpart, STT_FUNC; + +#ifdef CONFIG_ARITHMETIC_OPS_L1 +.section .l1.text +#else +.text +#endif + +___umulsi3_highpart: + R2 = R1.H * R0.H, R3 = R1.L * R0.H (FU); + R0 = R1.L * R0.L, R1 = R1.H * R0.L (FU); + R0 >>= 16; + /* Unsigned multiplication has the nice property that we can + ignore carry on this first addition. */ + R0 = R0 + R3; + R0 = R0 + R1; + cc = ac0; + R1 = cc; + R1 = PACK(R1.l,R0.h); + R0 = R1 + R2; + RTS; + +.size ___umulsi3_highpart, .-___umulsi3_highpart |