sh.md (is_sfunc): New attribute.
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Thu, 11 Feb 1999 07:48:50 +0000 (07:48 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Thu, 11 Feb 1999 07:48:50 +0000 (07:48 +0000)
* sh.md (is_sfunc): New attribute.
* sh.h (INSN_SETS_ARE_DELAYED, INSN_REFERENCES_ARE_DELAYED): Use it.

From-SVN: r25152

gcc/ChangeLog
gcc/config/sh/sh.h
gcc/config/sh/sh.md

index 50b3a2e5b180fa4b0a5ce9dba5eb9148fd1237d6..b86e61196f5a3fa7ff9c054a4a90e2dc7816b75a 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb 11 15:20:49 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * sh.md (is_sfunc): New attribute.
+       * sh.h (INSN_SETS_ARE_DELAYED, INSN_REFERENCES_ARE_DELAYED): Use it.
+
 Thu Feb 11 01:06:49 1999  Nathan Sidwell  <nathan@acm.org>
 
        * fold-const.c (range_binop): Take account of the bounded nature
index 260e9cb13daa333b5799345ebdebbc6a9b8d9ac5..db07aaea9c2555cbd7a2cf856ceead15579768ca 100644 (file)
@@ -1636,7 +1636,7 @@ extern struct rtx_def *sh_builtin_saveregs ();
    which set the argument registers into the delay slot of the millicode
    call -- thus they act more like traditional CALL_INSNs.
 
-   get_attr_type will try to recognize the given insn, so make sure to
+   get_attr_is_sfunc will try to recognize the given insn, so make sure to
    filter out things it will not accept -- SEQUENCE, USE and CLOBBER insns
    in particular.  */
 
@@ -1645,14 +1645,14 @@ extern struct rtx_def *sh_builtin_saveregs ();
     && GET_CODE (PATTERN (X)) != SEQUENCE      \
     && GET_CODE (PATTERN (X)) != USE           \
     && GET_CODE (PATTERN (X)) != CLOBBER       \
-    && get_attr_type (X) == TYPE_SFUNC))
+    && get_attr_is_sfunc (X)))
 
 #define INSN_REFERENCES_ARE_DELAYED(X)                 \
   ((GET_CODE (X) == INSN                       \
     && GET_CODE (PATTERN (X)) != SEQUENCE      \
     && GET_CODE (PATTERN (X)) != USE           \
     && GET_CODE (PATTERN (X)) != CLOBBER       \
-    && get_attr_type (X) == TYPE_SFUNC))
+    && get_attr_is_sfunc (X)))
 
 /* Compute the cost of an address.  For the SH, all valid addresses are
    the same cost.  */
index 29979cd13099e101657a690892fbdb58f76e9b1e..8dc823cef765d03c6543617870fa50938a40598d 100644 (file)
         (eq_attr "length" "2") (const_string "yes")
         ] (const_string "no")))
 
+(define_attr "is_sfunc" ""
+  (if_then_else (eq_attr "type" "sfunc") (const_int 1) (const_int 0)))
+
 (define_delay
   (eq_attr "needs_delay_slot" "yes")
   [(eq_attr "in_delay_slot" "yes") (nil) (nil)])