* grub-core/kern/arm/misc.S: Add __muldi3 and __aeabi_lmul. Those
helper functions are needed for thumb.
This commit is contained in:
parent
7d5116251d
commit
5e77d9cfc1
3 changed files with 38 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-11-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/kern/arm/misc.S: Add __muldi3 and __aeabi_lmul. Those
|
||||
helper functions are needed for thumb.
|
||||
|
||||
2013-11-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/disk/diskfilter.c (grub_diskfilter_make_raid): Make
|
||||
|
|
|
@ -30,6 +30,33 @@
|
|||
|
||||
.align 2
|
||||
|
||||
FUNCTION(__muldi3)
|
||||
FUNCTION(__aeabi_lmul)
|
||||
stmfd sp!, {r4, fp}
|
||||
add fp, sp, #4
|
||||
sub sp, sp, #16
|
||||
str r0, [fp, #-12]
|
||||
str r1, [fp, #-8]
|
||||
str r2, [fp, #-20]
|
||||
str r3, [fp, #-16]
|
||||
ldr r3, [fp, #-8]
|
||||
ldr r2, [fp, #-20]
|
||||
.long 0xe0020293 @ mul r2, r3, r2
|
||||
ldr r3, [fp, #-16]
|
||||
ldr r1, [fp, #-12]
|
||||
.long 0xe0030391 @ mul r3, r1, r3
|
||||
add r2, r2, r3
|
||||
ldr r0, [fp, #-12]
|
||||
ldr r1, [fp, #-20]
|
||||
umull r3, r4, r0, r1
|
||||
add r2, r2, r4
|
||||
mov r4, r2
|
||||
mov r0, r3
|
||||
mov r1, r4
|
||||
sub sp, fp, #4
|
||||
ldmfd sp!, {r4, fp}
|
||||
bx lr
|
||||
|
||||
.macro division parent
|
||||
|
||||
stmfd sp!, {lr}
|
||||
|
|
|
@ -469,6 +469,12 @@ EXPORT_FUNC (__aeabi_uidiv) (grub_uint32_t a, grub_uint32_t b);
|
|||
grub_uint32_t
|
||||
EXPORT_FUNC (__aeabi_uidivmod) (grub_uint32_t a, grub_uint32_t b);
|
||||
|
||||
/* Needed for allowing modules to be compiled as thumb. */
|
||||
grub_uint64_t
|
||||
EXPORT_FUNC (__muldi3) (grub_uint64_t a, grub_uint64_t b);
|
||||
grub_uint64_t
|
||||
EXPORT_FUNC (__aeabi_lmul) (grub_uint64_t a, grub_uint64_t b);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (__ia64__)
|
||||
|
|
Loading…
Reference in a new issue