aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2011-01-11 10:26:16 -0800
committerRichard Henderson <rth@gcc.gnu.org>2011-01-11 10:26:16 -0800
commita5c727e3babe7dfdb78652074dcefbedb10ab1a0 (patch)
treefbc32e2691ce42505226d2ccaa4712315ecc27f5
parent0d9e23f4eee0ad4c8932e099cbed6233106fe0bf (diff)
downloadgcc-a5c727e3babe7dfdb78652074dcefbedb10ab1a0.zip
gcc-a5c727e3babe7dfdb78652074dcefbedb10ab1a0.tar.gz
gcc-a5c727e3babe7dfdb78652074dcefbedb10ab1a0.tar.bz2
mn10300: Add attribute enabled.
This will allow merging am33 and mn103 patterns for which the set of alternatives can't be merged via constraint letters. From-SVN: r168674
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/config/mn10300/mn10300.md22
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ddcb3bc..8d5fb42 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2011-01-11 Richard Henderson <rth@redhat.com>
+ * config/mn10300/mn10300.md (isa): New attribute.
+ (enabled): New attribute.
+
* config/mn10300/mn10300.md (absdf2, negdf2): Remove.
(abssf2, negsf2): Define only for hardware fp.
(sqrtsf2): Reformat.
diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md
index 3a266960..bfa453f 100644
--- a/gcc/config/mn10300/mn10300.md
+++ b/gcc/config/mn10300/mn10300.md
@@ -46,6 +46,28 @@
(define_attr "cpu" "mn10300,am33,am33_2,am34"
(const (symbol_ref "(enum attr_cpu) mn10300_tune_cpu")))
+;; Used to control the "enabled" attribute on a per-instruction basis.
+(define_attr "isa" "base,am33,am33_2,am34"
+ (const_string "base"))
+
+(define_attr "enabled" ""
+ (cond [(eq_attr "isa" "base")
+ (const_int 1)
+
+ (and (eq_attr "isa" "am33")
+ (ne (symbol_ref "TARGET_AM33") (const_int 0)))
+ (const_int 1)
+
+ (and (eq_attr "isa" "am33_2")
+ (ne (symbol_ref "TARGET_AM33_2") (const_int 0)))
+ (const_int 1)
+
+ (and (eq_attr "isa" "am34")
+ (ne (symbol_ref "TARGET_AM34") (const_int 0)))
+ (const_int 1)
+ ]
+ (const_int 0))
+)
;; Pipeline description.