]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
avr.c (avr_out_xload): No SBIS around LPM so that instruction sequence is 1 byte...
authorGeorg-Johann Lay <avr@gjlay.de>
Mon, 22 Jul 2013 10:18:52 +0000 (10:18 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Mon, 22 Jul 2013 10:18:52 +0000 (10:18 +0000)
* config/avr/avr.c (avr_out_xload): No SBIS around LPM so that
instruction sequence is 1 byte shorter.

From-SVN: r201121

gcc/ChangeLog
gcc/config/avr/avr.c

index f0260dd43925dcbc1b9794b146c96ea079c8c792..98cc565a3b381aee25633b3b7b8916f51f2b8ffc 100644 (file)
@@ -1,3 +1,8 @@
+2013-07-22  Georg-Johann Lay  <avr@gjlay.de>
+
+       * config/avr/avr.c (avr_out_xload): No SBIS around LPM so that
+       instruction sequence is 1 byte shorter.
+
 2013-07-22  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (nonlocal_goto_receiver): Delete insn if
index 6d95c101c2b5e7cb80ced88a79710e09e53de2cf..14a3eee7c726eab64363e8e3b816f9d757604cea 100644 (file)
@@ -3079,14 +3079,10 @@ avr_out_xload (rtx insn ATTRIBUTE_UNUSED, rtx *op, int *plen)
   xop[2] = lpm_addr_reg_rtx;
   xop[3] = AVR_HAVE_LPMX ? op[0] : lpm_reg_rtx;
 
-  if (plen)
-    *plen = 0;
+  avr_asm_len (AVR_HAVE_LPMX ? "lpm %3,%a2" : "lpm", xop, plen, -1);
 
   avr_asm_len ("sbrc %1,7" CR_TAB
-               "ld %3,%a2" CR_TAB
-               "sbrs %1,7", xop, plen, 3);
-
-  avr_asm_len (AVR_HAVE_LPMX ? "lpm %3,%a2" : "lpm", xop, plen, 1);
+               "ld %3,%a2", xop, plen, 2);
 
   if (REGNO (xop[0]) != REGNO (xop[3]))
     avr_asm_len ("mov %0,%3", xop, plen, 1);