diff options
author | J"orn Rennecke <amylaar@cygnus.co.uk> | 1999-02-11 07:48:50 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 1999-02-11 07:48:50 +0000 |
commit | 0603a39d29a6d2edde51c9587802fb284690d781 (patch) | |
tree | 02c1b9612ad23ea772f19a9904c9bc038bee0c4b /gcc | |
parent | 9a95b64adf0a6feb29ac7b912807f69bdc85af83 (diff) | |
download | gcc-0603a39d29a6d2edde51c9587802fb284690d781.zip gcc-0603a39d29a6d2edde51c9587802fb284690d781.tar.gz gcc-0603a39d29a6d2edde51c9587802fb284690d781.tar.bz2 |
sh.md (is_sfunc): New attribute.
* sh.md (is_sfunc): New attribute.
* sh.h (INSN_SETS_ARE_DELAYED, INSN_REFERENCES_ARE_DELAYED): Use it.
From-SVN: r25152
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/sh/sh.h | 6 | ||||
-rw-r--r-- | gcc/config/sh/sh.md | 3 |
3 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 50b3a2e..b86e611 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 260e9cb..db07aae 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -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. */ diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 29979cd..8dc823c 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -482,6 +482,9 @@ (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)]) |