[PATCH] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions
Måns Rullgård
mans at mansr.com
Fri Nov 8 12:02:57 EST 2013
Stephen Boyd <sboyd at codeaurora.org> writes:
> +int __aeabi_idiv(int numerator, int denominator)
> +{
> + if (static_key_false(&cpu_has_idiv)) {
> + int ret;
> +
> + asm volatile (
> + ".arch_extension idiv\n"
> + "sdiv %0, %1, %2"
> + : "=&r" (ret)
There is no need for the & in the output constraint. Dropping it allows
using one of the source registers as destination which may sometimes be
beneficial.
> + : "r" (numerator), "r" (denominator));
> +
> + return ret;
> + }
> +
> + return ___aeabi_idiv(numerator, denominator);
> +}
--
Måns Rullgård
mans at mansr.com
More information about the linux-arm-kernel
mailing list