blob: 2d72de88af905737dc8fb7fac35cd0917a3611e4 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Adrian Bunk88278ca2008-05-19 16:53:02 -07002/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 * ashldi3.S: GCC emits these for certain drivers playing
4 * with long longs.
5 *
6 * Copyright (C) 1999 David S. Miller (davem@redhat.com)
7 */
8
David S. Miller8695c372012-05-11 20:33:22 -07009#include <linux/linkage.h>
Al Virod3867f042016-01-16 21:39:30 -050010#include <asm/export.h>
David S. Miller8695c372012-05-11 20:33:22 -070011
Linus Torvalds1da177e2005-04-16 15:20:36 -070012 .text
David S. Miller8695c372012-05-11 20:33:22 -070013ENTRY(__ashldi3)
Linus Torvalds1da177e2005-04-16 15:20:36 -070014 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
277:
28 srl %o1, %g2, %g2
29 sll %o1, %o2, %o5
30 or %g3, %g2, %o4
318:
32 mov %o4, %o0
33 mov %o5, %o1
349:
35 retl
36 nop
David S. Miller8695c372012-05-11 20:33:22 -070037ENDPROC(__ashldi3)
Al Virod3867f042016-01-16 21:39:30 -050038EXPORT_SYMBOL(__ashldi3)