On 15/11/11 16:17, Matthew Gretton-Dann wrote:
> All,
> 
> The attached patch causes libgcc to use the UDIV and SDIV instructions 
> when possible in the implementation of the ARM div/mod functions in libgcc.
> 
> This will benefit Cortex-M3, Cortex-M4, all Cortex-R* CPUs, Cortex-A7, 
> and Cortex-A15.
> 
> The special case of some Cortex-R* CPUs where the UDIV/SDIV instructions 
> are only available in Thumb mode, making it beneficial to force these 
> library functions into Thumb mode to make use of those instructions, is 
> not handled.
> 
> This was tested by configuring GCC --with-cpu cortex-a15, and then 
> running the testsuite with -mcpu=cortex-a9.  I've also manually 
> inspected libgcc to make sure the functions are being built as expected.
> 
> Please can someone review?
> 
> Thanks,
> 
> Matt
> 
> libgcc/ChangeLog:
> 
> 2011-11-15  Matthew Gretton-Dann  <matthew.gretton-d...@arm.com>
> 
>       * config/arm/lib1funcs.asm (udivsi3): Add support for divide
>       functions.
>       (aeabi_uidivmod): Likewise.     
>       (umodsi3): Likewise.
>       (divsi3): Likewise.
>       (aeabi_idivmod): Likewise.
>       (modsi3): Likewise.
> 

OK.

R.

Reply via email to