mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 23:51:33 +00:00
ARM EABI: add new helper functions resp. function names
The ARM EABI defines new names for GCC helper functions, and GCC seems to need some new functions as well. This patch is a minimal-invasive approach to fix problems with EABI conformant tool chains (to be used with "USE_PRIVATE_LIBGCC=yes"). Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Dirk Behme <dirk.behme@googlemail.com>
This commit is contained in:
parent
197324d7d9
commit
59b4d7471c
5 changed files with 33 additions and 9 deletions
|
@ -35,7 +35,9 @@ Boston, MA 02110-1301, USA. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.globl __ashldi3
|
.globl __ashldi3
|
||||||
|
.globl __aeabi_llsl
|
||||||
__ashldi3:
|
__ashldi3:
|
||||||
|
__aeabi_llsl:
|
||||||
|
|
||||||
subs r3, r2, #32
|
subs r3, r2, #32
|
||||||
rsb ip, r2, #32
|
rsb ip, r2, #32
|
||||||
|
|
|
@ -35,7 +35,9 @@ Boston, MA 02110-1301, USA. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.globl __ashrdi3
|
.globl __ashrdi3
|
||||||
|
.globl __aeabi_lasr
|
||||||
__ashrdi3:
|
__ashrdi3:
|
||||||
|
__aeabi_lasr:
|
||||||
|
|
||||||
subs r3, r2, #32
|
subs r3, r2, #32
|
||||||
rsb ip, r2, #32
|
rsb ip, r2, #32
|
||||||
|
|
|
@ -96,7 +96,9 @@
|
||||||
|
|
||||||
.align 5
|
.align 5
|
||||||
.globl __divsi3
|
.globl __divsi3
|
||||||
|
.globl __aeabi_idiv
|
||||||
__divsi3:
|
__divsi3:
|
||||||
|
__aeabi_idiv:
|
||||||
cmp r1, #0
|
cmp r1, #0
|
||||||
eor ip, r0, r1 @ save the sign of the result.
|
eor ip, r0, r1 @ save the sign of the result.
|
||||||
beq Ldiv0
|
beq Ldiv0
|
||||||
|
|
|
@ -35,7 +35,9 @@ Boston, MA 02110-1301, USA. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.globl __lshrdi3
|
.globl __lshrdi3
|
||||||
|
.globl __aeabi_llsr
|
||||||
__lshrdi3:
|
__lshrdi3:
|
||||||
|
__aeabi_llsr:
|
||||||
|
|
||||||
subs r3, r2, #32
|
subs r3, r2, #32
|
||||||
rsb ip, r2, #32
|
rsb ip, r2, #32
|
||||||
|
|
|
@ -12,8 +12,11 @@ curbit .req r3
|
||||||
.text
|
.text
|
||||||
.globl __udivsi3
|
.globl __udivsi3
|
||||||
.type __udivsi3 ,function
|
.type __udivsi3 ,function
|
||||||
|
.globl __aeabi_uidiv
|
||||||
|
.type __aeabi_uidiv ,function
|
||||||
.align 0
|
.align 0
|
||||||
__udivsi3 :
|
__udivsi3:
|
||||||
|
__aeabi_uidiv:
|
||||||
cmp divisor, #0
|
cmp divisor, #0
|
||||||
beq Ldiv0
|
beq Ldiv0
|
||||||
mov curbit, #1
|
mov curbit, #1
|
||||||
|
@ -68,10 +71,23 @@ Ldiv0:
|
||||||
mov r0, #0 @ about as wrong as it could be
|
mov r0, #0 @ about as wrong as it could be
|
||||||
ldmia sp!, {pc}
|
ldmia sp!, {pc}
|
||||||
.size __udivsi3 , . - __udivsi3
|
.size __udivsi3 , . - __udivsi3
|
||||||
/* # 235 "libgcc1.S" */
|
|
||||||
/* # 320 "libgcc1.S" */
|
.globl __aeabi_uidivmod
|
||||||
/* # 421 "libgcc1.S" */
|
__aeabi_uidivmod:
|
||||||
/* # 433 "libgcc1.S" */
|
|
||||||
/* # 456 "libgcc1.S" */
|
stmfd sp!, {r0, r1, ip, lr}
|
||||||
/* # 500 "libgcc1.S" */
|
bl __aeabi_uidiv
|
||||||
/* # 580 "libgcc1.S" */
|
ldmfd sp!, {r1, r2, ip, lr}
|
||||||
|
mul r3, r0, r2
|
||||||
|
sub r1, r1, r3
|
||||||
|
mov pc, lr
|
||||||
|
|
||||||
|
.globl __aeabi_idivmod
|
||||||
|
__aeabi_idivmod:
|
||||||
|
|
||||||
|
stmfd sp!, {r0, r1, ip, lr}
|
||||||
|
bl __aeabi_idiv
|
||||||
|
ldmfd sp!, {r1, r2, ip, lr}
|
||||||
|
mul r3, r0, r2
|
||||||
|
sub r1, r1, r3
|
||||||
|
mov pc, lr
|
||||||
|
|
Loading…
Reference in a new issue