From f493def153699c9bc2c90c1d636cbef490f5b70f Mon Sep 17 00:00:00 2001 From: Charles Baylis Date: Wed, 18 Jun 2014 15:42:21 +0000 Subject: [PATCH] bpabi.S (__aeabi_ldivmod): Optimise stack manipulation. 2014-06-18 Charles Baylis * config/arm/bpabi.S (__aeabi_ldivmod): Optimise stack manipulation. From-SVN: r211793 --- gcc/ChangeLog | 4 ++++ libgcc/config/arm/bpabi.S | 14 +++----------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2083ffaca0b1..fec83a5883e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-06-18 Charles Baylis + + * config/arm/bpabi.S (__aeabi_ldivmod): Optimise stack manipulation. + 2014-06-18 Charles Baylis * config/arm/bpabi.S (__aeabi_uldivmod): Perform division using call diff --git a/libgcc/config/arm/bpabi.S b/libgcc/config/arm/bpabi.S index 927e37ffd141..3f9ece58ba08 100644 --- a/libgcc/config/arm/bpabi.S +++ b/libgcc/config/arm/bpabi.S @@ -174,18 +174,10 @@ ARM_FUNC_START aeabi_ldivmod cfi_start __aeabi_ldivmod, LSYM(Lend_aeabi_ldivmod) test_div_by_zero signed - sub sp, sp, #8 -#if defined(__thumb2__) - mov ip, sp - push {ip, lr} -#else - do_push {sp, lr} -#endif -98: cfi_push 98b - __aeabi_ldivmod, 0xe, -0xc, 0x10 + push_for_divide __aeabi_ldivmod + /* arguments in (r0:r1), (r2:r3) and *sp */ bl SYM(__gnu_ldivmod_helper) __PLT__ - ldr lr, [sp, #4] - add sp, sp, #8 - do_pop {r2, r3} + pop_for_divide RET cfi_end LSYM(Lend_aeabi_ldivmod) -- 2.47.3