revert between 56095 -> 55830 in arch
[AROS.git] / arch / arm-all / arm-aeabi / uidivmod.S
blob037c5d905eb1090ddda0ae5799ca5a6914139c46
2         .text
3         .align 2
4         .global __aeabi_uidiv
5         .type __aeabi_uidiv,%function
6         .global __aeabi_uidivmod
7         .type __aeabi_uidivmod,%function
9 __aeabi_uidiv:
10 __aeabi_uidivmod:
11                         subs    r2, r1, #0
12                         bxeq    lr              /* div/0 !*/
14                         cmp     r2, r0
15                         movhi   r1, r0
16                         movhi   r0, #0
17                         bxhi    lr
19                         mov     r1, r0
21                         clz     r3, r1
22                         clz     r0, r2
23                         rsb     r0, r3, r0
24                         mov     r3, #1
25                         mov     r2, r2, asl r0
26                         mov     r3, r3, asl r0
27                         mov     r0, #0
29                         cmp     r1, r2
30                         rsbcs   r1, r2, r1
31                         orrcs   r0, r0, r3
32                         movs    r3, r3, lsr #1
33                         mov     r2, r2, lsr #1
34                         bne     1b
35                         bx lr