__rt_div fixes for arm (#3843)

[CRT/arm] Fix __rt_udiv and __rt_sdiv
This commit is contained in:
Roman Masanin 2021-07-24 21:23:58 +03:00 committed by GitHub
parent c30b1fe893
commit f2bc1f0e11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 32 deletions

View file

@ -18,19 +18,18 @@
NESTED_ENTRY __rt_udiv64
/* Allocate stack space and store parameters there */
stmdb sp!,{r0,r1,r2,r3,lr}
push {lr}
sub sp,sp,0x10
mov r12,sp
push {r12}
PROLOG_END
/* Load pointer to stack structure into R0 */
mov r0, sp
/* Call the C worker function */
adr lr, Return
b __rt_udiv64_worker
bl __rt_udiv64_worker
add sp,sp,0x04
Return
/* Move result data into the appropriate registers and return */
ldmia sp!,{r0,r1,r2,r3,pc}
pop {r0,r1,r2,r3,pc}
NESTED_END __rt_udiv64
END