From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions
Date: Fri, 08 Nov 2013 11:04:19 -0800 [thread overview]
Message-ID: <527D35B3.9020702@codeaurora.org> (raw)
In-Reply-To: <yw1xr4aqx1vi.fsf@unicorn.mansr.com>
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
prev parent reply other threads:[~2013-11-08 19:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 19:20 [PATCH] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions Stephen Boyd
2013-11-08 1:34 ` Rob Herring
2013-11-08 11:50 ` Jean-Christophe PLAGNIOL-VILLARD
2013-11-08 16:54 ` Russell King - ARM Linux
2013-11-08 18:51 ` Stephen Boyd
2013-11-08 9:58 ` Jean-Christophe PLAGNIOL-VILLARD
2013-11-08 16:52 ` Russell King - ARM Linux
2013-11-08 18:53 ` Stephen Boyd
2013-11-08 16:48 ` Christopher Covington
2013-11-08 18:51 ` Stephen Boyd
2013-11-08 17:02 ` Måns Rullgård
2013-11-08 19:04 ` Stephen Boyd [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=527D35B3.9020702@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).