From: Georg-Johann Lay <avr@gjlay.de>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [patch,avr,applied] PR114794 - Tweak divmodqi4
Date: Sun, 21 Apr 2024 14:39:37 +0200 [thread overview]
Message-ID: <8f6ef995-eb60-4a24-b0f4-8f7e326a55cd@gjlay.de> (raw)
Instead of jumping to a place that ROLs r_arg1 (with C=0),
LSL r_arg1 can be performed prior to the loop. This
reduces the number of loopings from 9 to 8.
Applied as obvious.
Johann
AVR: target/114794 - Tweak __udivmodqi4
libgcc/
PR target/114794
* config/avr/lib1funcs.S (__udivmodqi4): Tweak.
diff --git a/libgcc/config/avr/lib1funcs.S b/libgcc/config/avr/lib1funcs.S
index 535510ab867..af4d7d97016 100644
--- a/libgcc/config/avr/lib1funcs.S
+++ b/libgcc/config/avr/lib1funcs.S
@@ -1339,9 +1339,9 @@ DEFUN __umulsidi3
#if defined (L_udivmodqi4)
DEFUN __udivmodqi4
- sub r_rem,r_rem ; clear remainder and carry
- ldi r_cnt,9 ; init loop counter
- rjmp __udivmodqi4_ep ; jump to entry point
+ clr r_rem ; clear remainder
+ ldi r_cnt,8 ; init loop counter
+ lsl r_arg1 ; shift dividend
__udivmodqi4_loop:
rol r_rem ; shift dividend into remainder
cp r_rem,r_arg2 ; compare remainder & divisor
reply other threads:[~2024-04-21 12:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=8f6ef995-eb60-4a24-b0f4-8f7e326a55cd@gjlay.de \
--to=avr@gjlay.de \
--cc=gcc-patches@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).