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> |
| 8 | |
Wolfgang Denk | ba94a1b | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 9 | #ifdef __ARMEB__ |
| 10 | #define al r1 |
| 11 | #define ah r0 |
| 12 | #else |
| 13 | #define al r0 |
| 14 | #define ah r1 |
| 15 | #endif |
| 16 | |
| 17 | .globl __ashrdi3 |
| 18 | __ashrdi3: |
Simon Glass | 1251d51 | 2015-06-02 11:08:20 -0600 | [diff] [blame] | 19 | ENTRY(__aeabi_lasr) |
Wolfgang Denk | ba94a1b | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 20 | |
| 21 | subs r3, r2, #32 |
| 22 | rsb ip, r2, #32 |
| 23 | movmi al, al, lsr r2 |
| 24 | movpl al, ah, asr r3 |
| 25 | orrmi al, al, ah, lsl ip |
| 26 | mov ah, ah, asr r2 |
| 27 | mov pc, lr |
Simon Glass | 1251d51 | 2015-06-02 11:08:20 -0600 | [diff] [blame] | 28 | ENDPROC(__aeabi_lasr) |