From 3fbbd9e5adf2541a5f76f423697ac2c9020ae99e Mon Sep 17 00:00:00 2001 From: Chung-Ju Wu Date: Thu, 5 Apr 2018 02:58:19 +0000 Subject: [PATCH] [NDS32] Refine negsi2 pattern. gcc/ * config/nds32/nds32.md (negsi2): Refine pattern. From-SVN: r259118 --- gcc/ChangeLog | 4 ++++ gcc/config/nds32/nds32.md | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 19ea1ab7f62..cb27056da93 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-04-05 Chung-Ju Wu + + * config/nds32/nds32.md (negsi2): Refine pattern. + 2018-04-05 Kito Cheng Chung-Ju Wu diff --git a/gcc/config/nds32/nds32.md b/gcc/config/nds32/nds32.md index b7c82b69798..f69dd9de92f 100644 --- a/gcc/config/nds32/nds32.md +++ b/gcc/config/nds32/nds32.md @@ -773,15 +773,15 @@ ;; And for V2 ISA, there is NO 'neg33' instruction. ;; The only option is to use 'subri A,B,0' (its semantic is 'A = 0 - B'). (define_insn "negsi2" - [(set (match_operand:SI 0 "register_operand" "=w, r") - (neg:SI (match_operand:SI 1 "register_operand" " w, r")))] + [(set (match_operand:SI 0 "register_operand" "=l, r") + (neg:SI (match_operand:SI 1 "register_operand" " l, r")))] "" "@ neg33\t%0, %1 subri\t%0, %1, 0" - [(set_attr "type" "alu,alu") - (set_attr "length" " 2, 4")]) - + [(set_attr "type" "alu,alu") + (set_attr "length" " 2, 4") + (set_attr "feature" "v3m, v1")]) ;; ---------------------------------------------------------------------------- ;; 'ONE_COMPLIMENT' operation -- 2.30.2