Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Adrian Bunk | 88278ca | 2008-05-19 16:53:02 -0700 | [diff] [blame] | 2 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | * 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. Miller | 8695c37 | 2012-05-11 20:33:22 -0700 | [diff] [blame] | 9 | #include <linux/linkage.h> |
Al Viro | d3867f04 | 2016-01-16 21:39:30 -0500 | [diff] [blame] | 10 | #include <asm/export.h> |
David S. Miller | 8695c37 | 2012-05-11 20:33:22 -0700 | [diff] [blame] | 11 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | .text |
David S. Miller | 8695c37 | 2012-05-11 20:33:22 -0700 | [diff] [blame] | 13 | ENTRY(__ashldi3) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |
David S. Miller | 8695c37 | 2012-05-11 20:33:22 -0700 | [diff] [blame] | 37 | ENDPROC(__ashldi3) |
Al Viro | d3867f04 | 2016-01-16 21:39:30 -0500 | [diff] [blame] | 38 | EXPORT_SYMBOL(__ashldi3) |