]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
AVR: target/114794 - Tweak __udivmodqi4
authorGeorg-Johann Lay <avr@gjlay.de>
Sun, 21 Apr 2024 12:33:50 +0000 (14:33 +0200)
committerGeorg-Johann Lay <avr@gjlay.de>
Sun, 21 Apr 2024 12:45:00 +0000 (14:45 +0200)
libgcc/
PR target/114794
* config/avr/lib1funcs.S (__udivmodqi4): Tweak.

(cherry picked from commit a44d16efa7a508f8b8f303417d0714c39f159725)

libgcc/config/avr/lib1funcs.S

index 0870595111ad5b8121a57ee84a38994976c575d8..4ee651bf6eaec66f3014e3b54111622d0c0d2e7b 100644 (file)
@@ -1339,9 +1339,9 @@ ENDF __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