Commit 0aa683b3 by Chung-Ju Wu Committed by Chung-Ju Wu

[NDS32] Add subtype attribute for instructions.

gcc/
	* config/nds32/nds32.md (subtype): New attribute.

From-SVN: r259112
parent f2a3aa64
2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (subtype): New attribute.
2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com> 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR target/85203 PR target/85203
......
...@@ -55,6 +55,11 @@ ...@@ -55,6 +55,11 @@
"unknown,load,store,load_multiple,store_multiple,alu,alu_shift,mul,mac,div,branch,call,misc" "unknown,load,store,load_multiple,store_multiple,alu,alu_shift,mul,mac,div,branch,call,misc"
(const_string "unknown")) (const_string "unknown"))
;; Insn sub-type
(define_attr "subtype"
"simple,shift"
(const_string "simple"))
;; Length, in bytes, default is 4-bytes. ;; Length, in bytes, default is 4-bytes.
(define_attr "length" "" (const_int 4)) (define_attr "length" "" (const_int 4))
...@@ -736,6 +741,7 @@ ...@@ -736,6 +741,7 @@
rotri\t%0, %1, %2 rotri\t%0, %1, %2
rotr\t%0, %1, %2" rotr\t%0, %1, %2"
[(set_attr "type" " alu, alu") [(set_attr "type" " alu, alu")
(set_attr "subtype" "shift,shift")
(set_attr "length" " 4, 4")]) (set_attr "length" " 4, 4")])
...@@ -788,9 +794,9 @@ ...@@ -788,9 +794,9 @@
slli333\t%0, %1, %2 slli333\t%0, %1, %2
slli\t%0, %1, %2 slli\t%0, %1, %2
sll\t%0, %1, %2" sll\t%0, %1, %2"
[(set_attr "type" "alu,alu,alu") [(set_attr "type" " alu, alu, alu")
(set_attr "length" " 2, 4, 4")]) (set_attr "subtype" "shift,shift,shift")
(set_attr "length" " 2, 4, 4")])
(define_insn "ashrsi3" (define_insn "ashrsi3"
[(set (match_operand:SI 0 "register_operand" "= d, r, r") [(set (match_operand:SI 0 "register_operand" "= d, r, r")
(ashiftrt:SI (match_operand:SI 1 "register_operand" " 0, r, r") (ashiftrt:SI (match_operand:SI 1 "register_operand" " 0, r, r")
...@@ -800,8 +806,9 @@ ...@@ -800,8 +806,9 @@
srai45\t%0, %2 srai45\t%0, %2
srai\t%0, %1, %2 srai\t%0, %1, %2
sra\t%0, %1, %2" sra\t%0, %1, %2"
[(set_attr "type" "alu,alu,alu") [(set_attr "type" " alu, alu, alu")
(set_attr "length" " 2, 4, 4")]) (set_attr "subtype" "shift,shift,shift")
(set_attr "length" " 2, 4, 4")])
(define_insn "lshrsi3" (define_insn "lshrsi3"
[(set (match_operand:SI 0 "register_operand" "= d, r, r") [(set (match_operand:SI 0 "register_operand" "= d, r, r")
...@@ -812,8 +819,9 @@ ...@@ -812,8 +819,9 @@
srli45\t%0, %2 srli45\t%0, %2
srli\t%0, %1, %2 srli\t%0, %1, %2
srl\t%0, %1, %2" srl\t%0, %1, %2"
[(set_attr "type" "alu,alu,alu") [(set_attr "type" " alu, alu, alu")
(set_attr "length" " 2, 4, 4")]) (set_attr "subtype" "shift,shift,shift")
(set_attr "length" " 2, 4, 4")])
;; ---------------------------------------------------------------------------- ;; ----------------------------------------------------------------------------
......
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