port more changes to make PCI work
[linux-2.4.git] / arch / sparc / lib / ashldi3.S
1 /* $Id: ashldi3.S,v 1.2 1999/11/19 04:11:46 davem Exp $
2  * ashldi3.S:   GCC emits these for certain drivers playing
3  *              with long longs.
4  *
5  * Copyright (C) 1999 David S. Miller (davem@redhat.com)
6  */
7
8 #include <asm/cprefix.h>
9
10         .text
11         .align  4
12         .globl  C_LABEL(__ashldi3)
13 C_LABEL(__ashldi3):
14         cmp     %o2, 0
15         be      9f
16          mov    0x20, %g2
17
18         sub     %g2, %o2, %g2
19         cmp     %g2, 0
20         bg      7f
21          sll    %o0, %o2, %g3
22
23         neg     %g2
24         clr     %o5
25         b       8f
26          sll    %o1, %g2, %o4
27 7:
28         srl     %o1, %g2, %g2
29         sll     %o1, %o2, %o5
30         or      %g3, %g2, %o4
31 8:
32         mov     %o4, %o0
33         mov     %o5, %o1
34 9:
35         retl
36          nop