[AVR,committed]: out_movqi_mr_r: Fix length computation

Georg-Johann Lay avr@gjlay.de
Mon Jan 30 17:27:00 GMT 2012


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*



More information about the Gcc mailing list