blob: 1e3aefa209cba5c8662656cae95805d35f7bd214 [file] [log] [blame]
Gabe Black169c0df2013-10-08 18:24:10 -07001/* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005
2 Free Software Foundation, Inc.
3
4This file is free software; you can redistribute it and/or modify it
5under the terms of the GNU General Public License as published by the
6Free Software Foundation; either version 2, or (at your option) any
7later version.
8
9In addition to the permissions in the GNU General Public License, the
10Free Software Foundation gives you unlimited permission to link the
11compiled version of this file into combinations with other programs,
12and to distribute those combinations without any restriction coming
13from the use of this file. (The General Public License restrictions
14do apply in other respects; for example, they cover modification of
15the file, and distribution when not linked into a combine
16executable.)
17
18This file is distributed in the hope that it will be useful, but
19WITHOUT ANY WARRANTY; without even the implied warranty of
20MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21General Public License for more details.
Patrick Georgia73b9312015-10-31 11:55:10 +010022*/
Gabe Black169c0df2013-10-08 18:24:10 -070023
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
37ENTRY(__ashldi3)
Julius Werner7c6e4892014-01-24 16:23:08 -080038.global __aeabi_llsl
39__aeabi_llsl:
Gabe Black169c0df2013-10-08 18:24:10 -070040
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 Werner7c6e4892014-01-24 16:23:08 -080051.type __aeabi_llsl, %function
52.size __aeabi_llsl, .-__aeabi_llsl
Gabe Black169c0df2013-10-08 18:24:10 -070053ENDPROC(__ashldi3)
Gabe Black169c0df2013-10-08 18:24:10 -070054
55#endif