This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[AVR,committed]: out_movqi_mr_r: Fix length computation
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: gcc at gcc dot gnu dot org
- Cc: Denis Chertykov <chertykov at gmail dot com>, Eric Weddington <eric dot weddington at atmel dot com>
- Date: Mon, 30 Jan 2012 11:25:40 +0100
- Subject: [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*