This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[AVR,committed]: out_movqi_mr_r: Fix length computation


This patchlet fixes length computation of "std %0,%1" and "st %0,%1" that
reported 2 instead of 1. The reason is that the insn length was accumulated and
added to the length of 1 already set in the caller.

These length are unconditionally set to 1 now because there is no code emit
before these instructions and there is no need to accumulate lengths.

Johann

	* config/avr/avr.c (out_movqi_mr_r): Fix length computation.


Index: config/avr/avr.c
===================================================================
--- config/avr/avr.c    (revision 183695)
+++ config/avr/avr.c    (working copy)
@@ -3838,10 +3838,10 @@ out_movqi_mr_r (rtx insn, rtx op[], int
           return "";
         }

-      return avr_asm_len ("std %0,%1", op, plen, 1);
+      return avr_asm_len ("std %0,%1", op, plen, -1);
     }

-  return avr_asm_len ("st %0,%1", op, plen, 1);
+  return avr_asm_len ("st %0,%1", op, plen, -1);
 }

 static const char*


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]