pa.c (ireg_operand): New function.
authorJeffrey A Law <law@cygnus.com>
Wed, 3 Nov 1999 13:25:17 +0000 (13:25 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 3 Nov 1999 13:25:17 +0000 (06:25 -0700)
        * pa.c (ireg_operand): New function.
        * pa.h (PREDICATE_CODES): Handle ireg_operand.
        * pa.md (parallel_addb, parallel_movb): Use ireg_operand.
        Fix out of date comment.

From-SVN: r30375

gcc/ChangeLog
gcc/config/pa/pa.c
gcc/config/pa/pa.h
gcc/config/pa/pa.md

index d3ff77705b5600788eb7cf9abb36f1a70990018f..2cb9eb8babaf2afd22af711753e04a0228980266 100644 (file)
@@ -4,6 +4,11 @@ Wed Nov  3 12:12:59 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
 
 Wed Nov  3 03:26:28 1999  Jeffrey A Law  (law@cygnus.com)
 
+       * pa.c (ireg_operand): New function.
+       * pa.h (PREDICATE_CODES): Handle ireg_operand.
+       * pa.md (parallel_addb, parallel_movb): Use ireg_operand.
+       Fix out of date comment.
+
        * pa.md (negdi2): Turn into expander + anonymous pattern.
 
        * reload.c (find_reloads): Fix typos in recent change.
index 28fdf9335898412fc4b9bd9cc5fed57d16fb08d3..2145ef7961e9090a69365e46f2ad6bf333e83aee 100644 (file)
@@ -478,6 +478,15 @@ ireg_or_int5_operand (op, mode)
          || (GET_CODE (op) == REG && REGNO (op) > 0 && REGNO (op) < 32));
 }
 
+/* Return nonzero if OP is an integer register, else return zero.  */
+int
+ireg_operand (op, mode)
+     rtx op;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
+{
+  return (GET_CODE (op) == REG && REGNO (op) > 0 && REGNO (op) < 32);
+}
+
 /* Return truth value of whether OP is a integer which fits the
    range constraining immediate operands in three-address insns.  */
 
index 9a113d0404051ef4fc552e6ecbfc65a9e433f116..966e813a253b69ec47e5494cd821d8065b52d999 100644 (file)
@@ -2307,4 +2307,5 @@ extern struct rtx_def *return_addr_rtx ();
   {"shadd_operand", {CONST_INT}},                                      \
   {"basereg_operand", {REG}},                                          \
   {"div_operand", {REG, CONST_INT}},                                   \
+  {"ireg_operand", {REG}},                                             \
   {"movb_comparison_operator", {EQ, NE, LT, GE}},
index d753035d7274ccb2221954a00623f47dd9ef0b7b..34e82e6ba366e20793541056d98865ce9ee2ddd5 100644 (file)
          (const_int 8)
          (const_int 12)))))])
 
-;; The next several patterns (parallel_addb, parallel_movb, fmpyadd and
-;; fmpysub aren't currently used by the FSF sources, but will be soon.
-;;
-;; They're in the FSF tree for documentation and to make Cygnus<->FSF
-;; merging easier.
 (define_insn ""
   [(set (pc) (label_ref (match_operand 3 "" "" )))
-   (set (match_operand:SI 0 "register_operand" "=r")
-       (plus:SI (match_operand:SI 1 "register_operand" "r")
+   (set (match_operand:SI 0 "ireg_operand" "=r")
+       (plus:SI (match_operand:SI 1 "ireg_operand" "r")
                 (match_operand:SI 2 "ireg_or_int5_operand" "rL")))]
   "(reload_completed && operands[0] == operands[1]) || operands[0] == operands[2]"
   "*
 
 (define_insn ""
   [(set (pc) (label_ref (match_operand 2 "" "" )))
-   (set (match_operand:SF 0 "register_operand" "=r")
+   (set (match_operand:SF 0 "ireg_operand" "=r")
        (match_operand:SF 1 "ireg_or_int5_operand" "rL"))]
   "reload_completed"
   "*
 
 (define_insn ""
   [(set (pc) (label_ref (match_operand 2 "" "" )))
-   (set (match_operand:SI 0 "register_operand" "=r")
+   (set (match_operand:SI 0 "ireg_operand" "=r")
        (match_operand:SI 1 "ireg_or_int5_operand" "rL"))]
   "reload_completed"
   "*
 
 (define_insn ""
   [(set (pc) (label_ref (match_operand 2 "" "" )))
-   (set (match_operand:HI 0 "register_operand" "=r")
+   (set (match_operand:HI 0 "ireg_operand" "=r")
        (match_operand:HI 1 "ireg_or_int5_operand" "rL"))]
   "reload_completed"
   "*
 
 (define_insn ""
   [(set (pc) (label_ref (match_operand 2 "" "" )))
-   (set (match_operand:QI 0 "register_operand" "=r")
+   (set (match_operand:QI 0 "ireg_operand" "=r")
        (match_operand:QI 1 "ireg_or_int5_operand" "rL"))]
   "reload_completed"
   "*