blob: 60ebc7cdbee04a89b772b4ea28d515f86a5cae0e [file] [log] [blame]
David S. Miller8695c372012-05-11 20:33:22 -07001#include <linux/linkage.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07002
David S. Miller8695c372012-05-11 20:33:22 -07003ENTRY(__lshrdi3)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 cmp %o2, 0
5 be 3f
6 mov 0x20, %g2
7
8 sub %g2, %o2, %g2
9 cmp %g2, 0
10 bg 1f
11 srl %o0, %o2, %o4
12
13 clr %o4
14 neg %g2
15 b 2f
16 srl %o0, %g2, %o5
171:
18 sll %o0, %g2, %g3
19 srl %o1, %o2, %g2
20 or %g2, %g3, %o5
212:
22 mov %o4, %o0
23 mov %o5, %o1
243:
25 retl
26 nop
David S. Miller8695c372012-05-11 20:33:22 -070027ENDPROC(__lshrdi3)