提交 06b36cb7 编写于 作者: M Marek Vasut 提交者: Tom Rini

arm: lib: Sync libgcc shift operations

Sync the libgcc shift operations with Linux kernel 4.4.6 , commit
0d1912303e54ed1b2a371be0bba51c384dd57326 . Syncing these three
files is easy, as there is almost no change in them, except the
addition of Thumb support.

This patch also defines CONFIG_THUMB2_KERNEL and CONFIG_ARM_ASM_UNIFIED
which is necessary for correct build of these files both in ARM and
Thumb mode, just like Linux does.
Signed-off-by: NMarek Vasut <marex@denx.de>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: NTom Rini <trini@konsulko.com>
上级 11b1a9b2
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
*/ */
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/assembler.h>
#ifdef __ARMEB__ #ifdef __ARMEB__
#define al r1 #define al r1
...@@ -14,15 +15,18 @@ ...@@ -14,15 +15,18 @@
#define ah r1 #define ah r1
#endif #endif
.globl __ashldi3 ENTRY(__ashldi3)
__ashldi3:
ENTRY(__aeabi_llsl) ENTRY(__aeabi_llsl)
subs r3, r2, #32 subs r3, r2, #32
rsb ip, r2, #32 rsb ip, r2, #32
movmi ah, ah, lsl r2 movmi ah, ah, lsl r2
movpl ah, al, lsl r3 movpl ah, al, lsl r3
orrmi ah, ah, al, lsr ip ARM( orrmi ah, ah, al, lsr ip )
THUMB( lsrmi r3, al, ip )
THUMB( orrmi ah, ah, r3 )
mov al, al, lsl r2 mov al, al, lsl r2
mov pc, lr ret lr
ENDPROC(__ashldi3)
ENDPROC(__aeabi_llsl) ENDPROC(__aeabi_llsl)
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
*/ */
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/assembler.h>
#ifdef __ARMEB__ #ifdef __ARMEB__
#define al r1 #define al r1
...@@ -14,15 +15,18 @@ ...@@ -14,15 +15,18 @@
#define ah r1 #define ah r1
#endif #endif
.globl __ashrdi3 ENTRY(__ashrdi3)
__ashrdi3:
ENTRY(__aeabi_lasr) ENTRY(__aeabi_lasr)
subs r3, r2, #32 subs r3, r2, #32
rsb ip, r2, #32 rsb ip, r2, #32
movmi al, al, lsr r2 movmi al, al, lsr r2
movpl al, ah, asr r3 movpl al, ah, asr r3
orrmi al, al, ah, lsl ip ARM( orrmi al, al, ah, lsl ip )
THUMB( lslmi r3, ah, ip )
THUMB( orrmi al, al, r3 )
mov ah, ah, asr r2 mov ah, ah, asr r2
mov pc, lr ret lr
ENDPROC(__ashrdi3)
ENDPROC(__aeabi_lasr) ENDPROC(__aeabi_lasr)
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
*/ */
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/assembler.h>
#ifdef __ARMEB__ #ifdef __ARMEB__
#define al r1 #define al r1
...@@ -14,15 +15,18 @@ ...@@ -14,15 +15,18 @@
#define ah r1 #define ah r1
#endif #endif
.globl __lshrdi3 ENTRY(__lshrdi3)
__lshrdi3:
ENTRY(__aeabi_llsr) ENTRY(__aeabi_llsr)
subs r3, r2, #32 subs r3, r2, #32
rsb ip, r2, #32 rsb ip, r2, #32
movmi al, al, lsr r2 movmi al, al, lsr r2
movpl al, ah, lsr r3 movpl al, ah, lsr r3
orrmi al, al, ah, lsl ip ARM( orrmi al, al, ah, lsl ip )
THUMB( lslmi r3, ah, ip )
THUMB( orrmi al, al, r3 )
mov ah, ah, lsr r2 mov ah, ah, lsr r2
mov pc, lr ret lr
ENDPROC(__lshrdi3)
ENDPROC(__aeabi_llsr) ENDPROC(__aeabi_llsr)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册