Re: [PATCH] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions

From: Måns Rullgård
Date: Fri Nov 08 2013 - 12:12:43 EST


Stephen Boyd <sboyd@xxxxxxxxxxxxxx> 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@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/