relayd: move the interface fixup to the right place
[openwrt/staging/chunkeey.git] / target / linux / coldfire / files-2.6.31 / arch / m68k / coldfire / common / muldi3.S
1 /*
2 * Coldfire muldi3 assembly verion
3 * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
4 * Jason Jin Jason.Jin@freescale.com
5 * Shrek Wu B16972@freescale.com
6 */
7
8 #include <linux/linkage.h>
9 .globl __muldi3
10
11 ENTRY(__muldi3)
12 linkw %fp,#0
13 lea %sp@(-32),%sp
14 moveml %d2-%d7/%a2-%a3,%sp@
15 moveal %fp@(8), %a2
16 moveal %fp@(12), %a3
17 moveal %fp@(16), %a0
18 moveal %fp@(20),%a1
19 movel %a3,%d2
20 andil #65535,%d2
21 movel %a3,%d3
22 clrw %d3
23 swap %d3
24 movel %a1,%d0
25 andil #65535,%d0
26 movel %a1,%d1
27 clrw %d1
28 swap %d1
29 movel %d2,%d7
30 mulsl %d0,%d7
31 movel %d2,%d4
32 mulsl %d1,%d4
33 movel %d3,%d2
34 mulsl %d0,%d2
35 mulsl %d1,%d3
36 movel %d7,%d0
37 clrw %d0
38 swap %d0
39 addl %d0,%d4
40 addl %d2,%d4
41 cmpl %d4,%d2
42 blss 1f
43 addil #65536,%d3
44 1:
45 movel %d4,%d0
46 clrw %d0
47 swap %d0
48 movel %d3,%d5
49 addl %d0,%d5
50 movew %d4,%d6
51 swap %d6
52 movew %d7,%d6
53 movel %d5,%d0
54 movel %d6,%d1
55 movel %a3,%d2
56 movel %a0,%d3
57 mulsl %d3,%d2
58 movel %a2,%d3
59 movel %a1,%d4
60 mulsl %d4,%d3
61 addl %d3,%d2
62 movel %d2,%d0
63 addl %d5,%d0
64 moveml %sp@, %d2-%d7/%a2-%a3
65 lea %sp@(32),%sp
66 unlk %fp
67 rts