Commit c00896ff authored by Jan Kiszka's avatar Jan Kiszka
Browse files

cobalt/arch/arm: arith: Avoid r7 usage in helpers



In recent gcc, direct usage of r7 is in conflict with compiler
allocations. Skip it.

This pushes mach_arm_nodiv_llimd beyond r10. r11 is reserved as frame
pointer, but r12 should be fine between function calls and long branches
like in this case.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 4abd59b4
......@@ -79,9 +79,9 @@ mach_arm_nodiv_ullimd(const unsigned long long op,
register unsigned frach __asm__ ("r3");
register unsigned integ __asm__("r4") = rhs_integ;
register unsigned opl __asm__ ("r6");
register unsigned oph __asm__ ("r7");
register unsigned tl __asm__("r8");
register unsigned th __asm__("r9");
register unsigned oph __asm__ ("r8");
register unsigned tl __asm__("r9");
register unsigned th __asm__("r10");
xnarch_u64tou32(op, oph, opl);
xnarch_u64tou32(frac, frach, fracl);
......@@ -109,10 +109,10 @@ mach_arm_nodiv_llimd(const long long op,
register unsigned frach __asm__ ("r3");
register unsigned integ __asm__("r4") = rhs_integ;
register unsigned opl __asm__ ("r6");
register unsigned oph __asm__ ("r7");
register unsigned tl __asm__("r8");
register unsigned th __asm__("r9");
register unsigned s __asm__("r10");
register unsigned oph __asm__ ("r8");
register unsigned tl __asm__("r9");
register unsigned th __asm__("r10");
register unsigned s __asm__("r12");
xnarch_u64tou32(op, oph, opl);
xnarch_u64tou32(frac, frach, fracl);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment