From 30feb954d0fb8f6e3797f997de3a5daef6c19247 Mon Sep 17 00:00:00 2001 From: Chung-Ju Wu Date: Wed, 4 Apr 2018 01:35:01 +0000 Subject: [PATCH] [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 --- gcc/ChangeLog | 4 ++++ gcc/config/nds32/nds32.md | 22 +++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2b3369be703..a861a189e3f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-04-04 Chung-Ju Wu + + * config/nds32/nds32.md (enabled): Use yes/no for this attribute. + 2018-04-04 Chung-Ju Wu Kito Cheng diff --git a/gcc/config/nds32/nds32.md b/gcc/config/nds32/nds32.md index 0ececef5081..f0c31e7e0a7 100644 --- a/gcc/config/nds32/nds32.md +++ b/gcc/config/nds32/nds32.md @@ -69,11 +69,11 @@ ;; 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) -- 2.30.2