[NDS32] Change enabled attribute to yes/no instead of 1/0.
authorChung-Ju Wu <jasonwucj@gmail.com>
Wed, 4 Apr 2018 01:35:01 +0000 (01:35 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Wed, 4 Apr 2018 01:35:01 +0000 (01:35 +0000)
gcc/
* config/nds32/nds32.md (enabled): Use yes/no for this attribute.

From-SVN: r259066

gcc/ChangeLog
gcc/config/nds32/nds32.md

index 2b3369b..a861a18 100644 (file)
@@ -1,4 +1,8 @@
 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
+
+       * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
+
+2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
            Kito Cheng  <kito.cheng@gmail.com>
 
        * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
index 0ececef..f0c31e7 100644 (file)
 ;; If the instruction pattern already check TARGET_16_BIT to
 ;; determine the length by itself, its enabled attribute should be
 ;; always 1 to avoid the conflict with the settings here.
-(define_attr "enabled" ""
+(define_attr "enabled" "no,yes"
   (cond [(and (eq_attr "length" "2")
              (match_test "!TARGET_16_BIT"))
-        (const_int 0)]
-       (const_int 1)))
+        (const_string "no")]
+       (const_string "yes")))
 
 
 ;; ----------------------------------------------------------------------------
@@ -1296,7 +1296,7 @@ create_template:
     }
 }
   [(set_attr "type" "branch")
-   (set_attr "enabled" "1")
+   (set_attr "enabled" "yes")
    (set_attr_alternative "length"
      [
        ;; Alternative 0
@@ -1878,7 +1878,7 @@ create_template:
     }
 }
   [(set_attr "type" "branch")
-   (set_attr "enabled" "1")
+   (set_attr "enabled" "yes")
    (set (attr "length")
        (if_then_else (and (ge (minus (match_dup 0) (pc)) (const_int -250))
                           (le (minus (match_dup 0) (pc)) (const_int  250)))
@@ -2028,7 +2028,7 @@ create_template:
       gcc_unreachable ();
     }
 }
-  [(set_attr "enabled" "1")
+  [(set_attr "enabled" "yes")
    (set_attr "type" "branch")
    (set_attr_alternative "length"
      [
@@ -2079,7 +2079,7 @@ create_template:
       gcc_unreachable ();
     }
 }
-  [(set_attr "enabled" "1")
+  [(set_attr "enabled" "yes")
    (set_attr "type" "branch")
    (set_attr_alternative "length"
      [
@@ -2146,7 +2146,7 @@ create_template:
     return "nop";
 }
   [(set_attr "type" "misc")
-   (set_attr "enabled" "1")
+   (set_attr "enabled" "yes")
    (set (attr "length")
        (if_then_else (match_test "TARGET_16_BIT")
                      (const_int 2)
@@ -2172,7 +2172,7 @@ create_template:
 }
   [(set_attr "type" "store_multiple")
    (set_attr "combo" "12")
-   (set_attr "enabled" "1")
+   (set_attr "enabled" "yes")
    (set (attr "length")
        (if_then_else (match_test "TARGET_V3PUSH
                                   && !nds32_isr_function_p (cfun->decl)
@@ -2195,7 +2195,7 @@ create_template:
 }
   [(set_attr "type" "load_multiple")
    (set_attr "combo" "12")
-   (set_attr "enabled" "1")
+   (set_attr "enabled" "yes")
    (set (attr "length")
        (if_then_else (match_test "TARGET_V3PUSH
                                   && !nds32_isr_function_p (cfun->decl)
@@ -2234,7 +2234,7 @@ create_template:
     return "ret";
 }
   [(set_attr "type" "branch")
-   (set_attr "enabled" "1")
+   (set_attr "enabled" "yes")
    (set (attr "length")
        (if_then_else (match_test "TARGET_16_BIT")
                      (const_int 2)