Merge remote-tracking branch 'sound-asoc/for-next'
[deliverable/linux.git] / arch / arm / lib / muldi3.S
CommitLineData
f741a1aa
NP
1/*
2 * linux/arch/arm/lib/muldi3.S
3 *
4 * Author: Nicolas Pitre
5 * Created: Oct 19, 2005
6 * Copyright: Monta Vista Software, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#include <linux/linkage.h>
6ebbf2ce 14#include <asm/assembler.h>
4dd1837d 15#include <asm/export.h>
f741a1aa
NP
16
17#ifdef __ARMEB__
18#define xh r0
19#define xl r1
20#define yh r2
21#define yl r3
22#else
23#define xl r0
24#define xh r1
25#define yl r2
26#define yh r3
27#endif
28
29ENTRY(__muldi3)
ba95e4e4 30ENTRY(__aeabi_lmul)
f741a1aa
NP
31
32 mul xh, yl, xh
33 mla xh, xl, yh, xh
3c8fdae7
RK
34 mov ip, xl, lsr #16
35 mov yh, yl, lsr #16
f741a1aa
NP
36 bic xl, xl, ip, lsl #16
37 bic yl, yl, yh, lsl #16
38 mla xh, yh, ip, xh
39 mul yh, xl, yh
40 mul xl, yl, xl
41 mul ip, yl, ip
42 adds xl, xl, yh, lsl #16
43 adc xh, xh, yh, lsr #16
44 adds xl, xl, ip, lsl #16
45 adc xh, xh, ip, lsr #16
6ebbf2ce 46 ret lr
f741a1aa 47
93ed3970
CM
48ENDPROC(__muldi3)
49ENDPROC(__aeabi_lmul)
4dd1837d
AV
50EXPORT_SYMBOL(__muldi3)
51EXPORT_SYMBOL(__aeabi_lmul)
This page took 1.248271 seconds and 5 git commands to generate.