https://gcc.gnu.org/g:be08fe2d690025cdec2876ff3fc6a03ecc170943

commit r16-9084-gbe08fe2d690025cdec2876ff3fc6a03ecc170943
Author: Georg-Johann Lay <[email protected]>
Date:   Thu Jun 11 19:51:12 2026 +0200

    AVR: target/125751 -- Fix too short insns lengths in avr_out_fract.
    
            PR target/125751
    gcc/
            * config/avr/avr.cc (avr_out_fract): Fix too small sequence
            lengths in avr_asm_len calls.
    
    (cherry picked from commit df28012bc9294aa76490d90498a2a55c6d92c688)

Diff:
---
 gcc/config/avr/avr.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/config/avr/avr.cc b/gcc/config/avr/avr.cc
index 25cb518b0f3e..b47d10d8f0ae 100644
--- a/gcc/config/avr/avr.cc
+++ b/gcc/config/avr/avr.cc
@@ -10541,7 +10541,7 @@ avr_out_fract (rtx_insn *insn, rtx operands[], bool 
intsigned, int *plen)
        {
          avr_asm_len ("clr __tmp_reg__" CR_TAB
                       "sbrc %1,0"       CR_TAB
-                      "dec __tmp_reg__", xop, plen, 1);
+                      "dec __tmp_reg__", xop, plen, 3);
          sn = src.regno;
          if (sn < s0)
            {
@@ -10556,7 +10556,7 @@ avr_out_fract (rtx_insn *insn, rtx operands[], bool 
intsigned, int *plen)
            avr_asm_len ("clt"                CR_TAB
                         "bld __tmp_reg__,7"  CR_TAB
                         "adc %0,__tmp_reg__",
-                        &all_regs_rtx[s0], plen, 1);
+                        &all_regs_rtx[s0], plen, 3);
          else
            avr_asm_len ("lsr __tmp_reg" CR_TAB
                         "add %0,__tmp_reg__",
@@ -10755,8 +10755,8 @@ avr_out_fract (rtx_insn *insn, rtx operands[], bool 
intsigned, int *plen)
          xop[2] = all_regs_rtx[s0];
          if (!lsb_in_tmp_reg && !MAY_CLOBBER (s0))
            avr_asm_len ("mov __tmp_reg__,%2", xop, plen, 1);
-         avr_asm_len ("tst %0" CR_TAB "brpl 0f",
-                      &all_regs_rtx[src.regno_msb], plen, 2);
+         avr_asm_len ("tst %0" CR_TAB
+                      "brpl 0f", &all_regs_rtx[src.regno_msb], plen, 2);
          if (!lsb_in_tmp_reg)
            {
              unsigned sn = src.regno;

Reply via email to