Commit 30feb954 by Chung-Ju Wu Committed by Chung-Ju Wu

[NDS32] Change enabled attribute to yes/no instead of 1/0.

gcc/
	* config/nds32/nds32.md (enabled): Use yes/no for this attribute.

From-SVN: r259066
parent cc48a87f
2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com> 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> Kito Cheng <kito.cheng@gmail.com>
* config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function. * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
......
...@@ -69,11 +69,11 @@ ...@@ -69,11 +69,11 @@
;; If the instruction pattern already check TARGET_16_BIT to ;; If the instruction pattern already check TARGET_16_BIT to
;; determine the length by itself, its enabled attribute should be ;; determine the length by itself, its enabled attribute should be
;; always 1 to avoid the conflict with the settings here. ;; always 1 to avoid the conflict with the settings here.
(define_attr "enabled" "" (define_attr "enabled" "no,yes"
(cond [(and (eq_attr "length" "2") (cond [(and (eq_attr "length" "2")
(match_test "!TARGET_16_BIT")) (match_test "!TARGET_16_BIT"))
(const_int 0)] (const_string "no")]
(const_int 1))) (const_string "yes")))
;; ---------------------------------------------------------------------------- ;; ----------------------------------------------------------------------------
...@@ -1296,7 +1296,7 @@ create_template: ...@@ -1296,7 +1296,7 @@ create_template:
} }
} }
[(set_attr "type" "branch") [(set_attr "type" "branch")
(set_attr "enabled" "1") (set_attr "enabled" "yes")
(set_attr_alternative "length" (set_attr_alternative "length"
[ [
;; Alternative 0 ;; Alternative 0
...@@ -1878,7 +1878,7 @@ create_template: ...@@ -1878,7 +1878,7 @@ create_template:
} }
} }
[(set_attr "type" "branch") [(set_attr "type" "branch")
(set_attr "enabled" "1") (set_attr "enabled" "yes")
(set (attr "length") (set (attr "length")
(if_then_else (and (ge (minus (match_dup 0) (pc)) (const_int -250)) (if_then_else (and (ge (minus (match_dup 0) (pc)) (const_int -250))
(le (minus (match_dup 0) (pc)) (const_int 250))) (le (minus (match_dup 0) (pc)) (const_int 250)))
...@@ -2028,7 +2028,7 @@ create_template: ...@@ -2028,7 +2028,7 @@ create_template:
gcc_unreachable (); gcc_unreachable ();
} }
} }
[(set_attr "enabled" "1") [(set_attr "enabled" "yes")
(set_attr "type" "branch") (set_attr "type" "branch")
(set_attr_alternative "length" (set_attr_alternative "length"
[ [
...@@ -2079,7 +2079,7 @@ create_template: ...@@ -2079,7 +2079,7 @@ create_template:
gcc_unreachable (); gcc_unreachable ();
} }
} }
[(set_attr "enabled" "1") [(set_attr "enabled" "yes")
(set_attr "type" "branch") (set_attr "type" "branch")
(set_attr_alternative "length" (set_attr_alternative "length"
[ [
...@@ -2146,7 +2146,7 @@ create_template: ...@@ -2146,7 +2146,7 @@ create_template:
return "nop"; return "nop";
} }
[(set_attr "type" "misc") [(set_attr "type" "misc")
(set_attr "enabled" "1") (set_attr "enabled" "yes")
(set (attr "length") (set (attr "length")
(if_then_else (match_test "TARGET_16_BIT") (if_then_else (match_test "TARGET_16_BIT")
(const_int 2) (const_int 2)
...@@ -2172,7 +2172,7 @@ create_template: ...@@ -2172,7 +2172,7 @@ create_template:
} }
[(set_attr "type" "store_multiple") [(set_attr "type" "store_multiple")
(set_attr "combo" "12") (set_attr "combo" "12")
(set_attr "enabled" "1") (set_attr "enabled" "yes")
(set (attr "length") (set (attr "length")
(if_then_else (match_test "TARGET_V3PUSH (if_then_else (match_test "TARGET_V3PUSH
&& !nds32_isr_function_p (cfun->decl) && !nds32_isr_function_p (cfun->decl)
...@@ -2195,7 +2195,7 @@ create_template: ...@@ -2195,7 +2195,7 @@ create_template:
} }
[(set_attr "type" "load_multiple") [(set_attr "type" "load_multiple")
(set_attr "combo" "12") (set_attr "combo" "12")
(set_attr "enabled" "1") (set_attr "enabled" "yes")
(set (attr "length") (set (attr "length")
(if_then_else (match_test "TARGET_V3PUSH (if_then_else (match_test "TARGET_V3PUSH
&& !nds32_isr_function_p (cfun->decl) && !nds32_isr_function_p (cfun->decl)
...@@ -2234,7 +2234,7 @@ create_template: ...@@ -2234,7 +2234,7 @@ create_template:
return "ret"; return "ret";
} }
[(set_attr "type" "branch") [(set_attr "type" "branch")
(set_attr "enabled" "1") (set_attr "enabled" "yes")
(set (attr "length") (set (attr "length")
(if_then_else (match_test "TARGET_16_BIT") (if_then_else (match_test "TARGET_16_BIT")
(const_int 2) (const_int 2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment