lkml.org 
[lkml]   [2013]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions
On 11/08/13 09:02, Måns Rullgård wrote:
> Stephen Boyd <sboyd@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.

Ok. Thanks. That does seem to improve things.

before:

00000000 <__aeabi_idiv>:
0: e320f000 nop {0}
4: eafffffe b 0 <___aeabi_idiv>
8: e713f110 sdiv r3, r0, r1
c: e1a00003 mov r0, r3
10: e12fff1e bx lr

00000014 <__aeabi_uidiv>:
14: e320f000 nop {0}
18: eafffffe b 0 <___aeabi_uidiv>
1c: e733f110 udiv r3, r0, r1
20: e1a00003 mov r0, r3
24: e12fff1e bx lr

after:

00000000 <__aeabi_idiv>:
0: e320f000 nop {0}
4: eafffffe b 0 <___aeabi_idiv>
8: e710f110 sdiv r0, r0, r1
c: e12fff1e bx lr

00000010 <__aeabi_uidiv>:
10: e320f000 nop {0}
14: eafffffe b 0 <___aeabi_uidiv>
18: e730f110 udiv r0, r0, r1
1c: e12fff1e bx lr


--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2013-11-08 20:21    [W:0.066 / U:2.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site