c4x.md (addqi3): Emit addqi3_noclobber pattern during reload.
authorMichael Hayes <m.hayes@elec.canterbury.ac.nz>
Wed, 25 Nov 1998 17:14:35 +0000 (17:14 +0000)
committerMichael Hayes <m.hayes@gcc.gnu.org>
Wed, 25 Nov 1998 17:14:35 +0000 (17:14 +0000)
* config/c4x/c4x.md (addqi3): Emit addqi3_noclobber pattern
during reload.

From-SVN: r23872

gcc/ChangeLog
gcc/config/c4x/c4x.md

index 37b6f60f457f29a0b200d0b25ca422062bbf24a9..803fb78e5797265d280ad821e5a295d34d09f2dd 100644 (file)
@@ -1,3 +1,8 @@
+Thu Nov 26 14:12:05 1998  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
+
+       * config/c4x/c4x.md (addqi3): Emit addqi3_noclobber pattern
+       during reload.
+
 Wed Nov 25 22:05:28 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
 
        * config/sh/lib1funcs.asm (___udivsi3_i4): Don't switch to sz == 1
index 58033f02c7a190fd23b4d59f59424a4c7454c61b..117e1577bc0ddd2dea166d210e373327e66b5ef5 100644 (file)
 ;
 ; ADDI
 ;
+; This is used by reload when it calls gen_add2_insn for address arithmetic
+; so we must emit the pattern that doesn't clobber CC.
+;
 (define_expand "addqi3"
   [(parallel [(set (match_operand:QI 0 "reg_operand" "")
                    (plus:QI (match_operand:QI 1 "src_operand" "")
                             (match_operand:QI 2 "src_operand" "")))
               (clobber (reg:CC_NOOV 21))])]
   ""
-  "legitimize_operands (PLUS, operands, QImode);")
+  "legitimize_operands (PLUS, operands, QImode);
+   if (reload_in_progress)
+   {
+      emit_insn (gen_addqi3_noclobber (operands[0], operands[1], operands[2]));
+      DONE;
+   }")
 
 (define_insn "*addqi3_clobber"
   [(set (match_operand:QI 0 "reg_operand" "=d,?d,d,c,?c,c")