(parallel inc/dec and branch-if-zero/nonzero): 4 new patterns.
authorTorbjorn Granlund <tege@gnu.org>
Wed, 16 Oct 1996 08:17:32 +0000 (08:17 +0000)
committerTorbjorn Granlund <tege@gnu.org>
Wed, 16 Oct 1996 08:17:32 +0000 (08:17 +0000)
From-SVN: r12968

gcc/config/i386/i386.md

index 341f10022d5b08a27ef9d0c882449e68207a092d..524877def8d6410d5d4c689e997cc432f9a342f4 100644 (file)
   return AS1 (%J0,%l3);
 }")
 
+(define_insn ""
+  [(set (pc)
+       (if_then_else (ne (match_operand:SI 0 "general_operand" "g")
+                         (const_int 0))
+                     (label_ref (match_operand 1 "" ""))
+                     (pc)))
+   (set (match_dup 0)
+       (plus:SI (match_dup 0)
+                (const_int -1)))]
+  ""
+  "*
+{
+  operands[2] = const1_rtx;
+  output_asm_insn (AS2 (sub%L0,%2,%0), operands);
+  return \"jnc %l1\";
+}")
+
+(define_insn ""
+  [(set (pc)
+       (if_then_else (eq (match_operand:SI 0 "general_operand" "g")
+                         (const_int 0))
+                     (label_ref (match_operand 1 "" ""))
+                     (pc)))
+   (set (match_dup 0)
+       (plus:SI (match_dup 0)
+                (const_int -1)))]
+  ""
+  "*
+{
+  operands[2] = const1_rtx;
+  output_asm_insn (AS2 (sub%L0,%2,%0), operands);
+  return \"jc %l1\";
+}")
+
+(define_insn ""
+  [(set (pc)
+       (if_then_else (ne (match_operand:SI 0 "general_operand" "g")
+                         (const_int 0))
+                     (label_ref (match_operand 1 "" ""))
+                     (pc)))
+   (set (match_dup 0)
+       (plus:SI (match_dup 0)
+                (const_int 1)))]
+  ""
+  "*
+{
+  operands[2] = const1_rtx;
+  output_asm_insn (AS2 (add%L0,%2,%0), operands);
+  return \"jnc %l1\";
+}")
+
+(define_insn ""
+  [(set (pc)
+       (if_then_else (eq (match_operand:SI 0 "general_operand" "g")
+                         (const_int 0))
+                     (label_ref (match_operand 1 "" ""))
+                     (pc)))
+   (set (match_dup 0)
+       (plus:SI (match_dup 0)
+                (const_int 1)))]
+  ""
+  "*
+{
+  operands[2] = const1_rtx;
+  output_asm_insn (AS2 (add%L0,%2,%0), operands);
+  return \"jc %l1\";
+}")
+
 ;; Implement switch statements when generating PIC code.  Switches are
 ;; implemented by `tablejump' when not using -fpic.