Wolfgang Denk | ba94a1b | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 1 | /* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005 |
| 2 | Free Software Foundation, Inc. |
| 3 | |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
Wolfgang Denk | ba94a1b | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 6 | |
Simon Glass | 1251d51 | 2015-06-02 11:08:20 -0600 | [diff] [blame] | 7 | #include <linux/linkage.h> |
Marek Vasut | 06b36cb | 2016-05-26 18:01:39 +0200 | [diff] [blame] | 8 | #include <asm/assembler.h> |
Simon Glass | 1251d51 | 2015-06-02 11:08:20 -0600 | [diff] [blame] | 9 | |
Wolfgang Denk | ba94a1b | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 10 | #ifdef __ARMEB__ |
| 11 | #define al r1 |
| 12 | #define ah r0 |
| 13 | #else |
| 14 | #define al r0 |
| 15 | #define ah r1 |
| 16 | #endif |
| 17 | |
Stephen Warren | b2f1858 | 2016-06-03 13:05:11 -0600 | [diff] [blame] | 18 | .pushsection .text.__ashldi3, "ax" |
Marek Vasut | 06b36cb | 2016-05-26 18:01:39 +0200 | [diff] [blame] | 19 | ENTRY(__ashldi3) |
Simon Glass | 1251d51 | 2015-06-02 11:08:20 -0600 | [diff] [blame] | 20 | ENTRY(__aeabi_llsl) |
Wolfgang Denk | ba94a1b | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 21 | |
| 22 | subs r3, r2, #32 |
| 23 | rsb ip, r2, #32 |
| 24 | movmi ah, ah, lsl r2 |
| 25 | movpl ah, al, lsl r3 |
Marek Vasut | 06b36cb | 2016-05-26 18:01:39 +0200 | [diff] [blame] | 26 | ARM( orrmi ah, ah, al, lsr ip ) |
| 27 | THUMB( lsrmi r3, al, ip ) |
| 28 | THUMB( orrmi ah, ah, r3 ) |
Wolfgang Denk | ba94a1b | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 29 | mov al, al, lsl r2 |
Marek Vasut | 06b36cb | 2016-05-26 18:01:39 +0200 | [diff] [blame] | 30 | ret lr |
| 31 | |
| 32 | ENDPROC(__ashldi3) |
Simon Glass | 1251d51 | 2015-06-02 11:08:20 -0600 | [diff] [blame] | 33 | ENDPROC(__aeabi_llsl) |
Stephen Warren | b2f1858 | 2016-06-03 13:05:11 -0600 | [diff] [blame] | 34 | .popsection |