Gabe Black | 169c0df | 2013-10-08 18:24:10 -0700 | [diff] [blame] | 1 | /* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005 |
| 2 | Free Software Foundation, Inc. |
| 3 | |
| 4 | This file is free software; you can redistribute it and/or modify it |
| 5 | under the terms of the GNU General Public License as published by the |
| 6 | Free Software Foundation; either version 2, or (at your option) any |
| 7 | later version. |
| 8 | |
| 9 | In addition to the permissions in the GNU General Public License, the |
| 10 | Free Software Foundation gives you unlimited permission to link the |
| 11 | compiled version of this file into combinations with other programs, |
| 12 | and to distribute those combinations without any restriction coming |
| 13 | from the use of this file. (The General Public License restrictions |
| 14 | do apply in other respects; for example, they cover modification of |
| 15 | the file, and distribution when not linked into a combine |
| 16 | executable.) |
| 17 | |
| 18 | This file is distributed in the hope that it will be useful, but |
| 19 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 21 | General Public License for more details. |
Patrick Georgi | a73b931 | 2015-10-31 11:55:10 +0100 | [diff] [blame] | 22 | */ |
Gabe Black | 169c0df | 2013-10-08 18:24:10 -0700 | [diff] [blame] | 23 | |
| 24 | |
| 25 | #if defined __GNUC__ |
| 26 | |
| 27 | #include <arch/asm.h> |
| 28 | |
| 29 | #ifdef __ARMEB__ |
| 30 | #define al r1 |
| 31 | #define ah r0 |
| 32 | #else |
| 33 | #define al r0 |
| 34 | #define ah r1 |
| 35 | #endif |
| 36 | |
| 37 | ENTRY(__ashldi3) |
Julius Werner | 7c6e489 | 2014-01-24 16:23:08 -0800 | [diff] [blame] | 38 | .global __aeabi_llsl |
| 39 | __aeabi_llsl: |
Gabe Black | 169c0df | 2013-10-08 18:24:10 -0700 | [diff] [blame] | 40 | |
| 41 | subs r3, r2, #32 |
| 42 | rsb ip, r2, #32 |
| 43 | movmi ah, ah, lsl r2 |
| 44 | movpl ah, al, lsl r3 |
| 45 | ARM( orrmi ah, ah, al, lsr ip ) |
| 46 | THUMB( lsrmi r3, al, ip ) |
| 47 | THUMB( orrmi ah, ah, r3 ) |
| 48 | mov al, al, lsl r2 |
| 49 | mov pc, lr |
| 50 | |
Julius Werner | 7c6e489 | 2014-01-24 16:23:08 -0800 | [diff] [blame] | 51 | .type __aeabi_llsl, %function |
| 52 | .size __aeabi_llsl, .-__aeabi_llsl |
Gabe Black | 169c0df | 2013-10-08 18:24:10 -0700 | [diff] [blame] | 53 | ENDPROC(__ashldi3) |
Gabe Black | 169c0df | 2013-10-08 18:24:10 -0700 | [diff] [blame] | 54 | |
| 55 | #endif |