]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[RISCV] Move iterators from bitmanip.md to iterators.md
authorAndrew Pinski <apinski@marvell.com>
Thu, 11 Aug 2022 23:52:29 +0000 (23:52 +0000)
committerAndrew Pinski <apinski@marvell.com>
Wed, 24 Aug 2022 19:15:30 +0000 (12:15 -0700)
Just like the previous patch this move all of the iterators
of bitmanip.md to iterators.md.  All modern backends put the
iterators in iterators.md for easier access.

OK? Built and tested for riscv32-linux-gnu with --with-arch=rv32imafdc_zba_zbb_zbc_zbs.

Thanks,
Andrew Pinski

gcc/ChangeLog:

* config/riscv/bitmanip.md
(bitmanip_bitwise, bitmanip_minmax, clz_ctz_pcna,
tbitmanip_optab, bitmanip_insn, shiftm1): Move to ...
* config/riscv/iterators.md: Here.

gcc/config/riscv/bitmanip.md
gcc/config/riscv/iterators.md

index c4383285d81be30d7181a606c46c0dbab9bb4cb2..6317fedbbf6313aea522b57575d8c11c566ff5b3 100644 (file)
 ;; along with GCC; see the file COPYING3.  If not see
 ;; <http://www.gnu.org/licenses/>.
 
-(define_code_iterator bitmanip_bitwise [and ior])
-
-(define_code_iterator bitmanip_minmax [smin umin smax umax])
-
-(define_code_iterator clz_ctz_pcnt [clz ctz popcount])
-
-(define_code_attr bitmanip_optab [(smin "smin")
-                                 (smax "smax")
-                                 (umin "umin")
-                                 (umax "umax")
-                                 (clz "clz")
-                                 (ctz "ctz")
-                                 (popcount "popcount")])
-
-
-(define_code_attr bitmanip_insn [(smin "min")
-                                (smax "max")
-                                (umin "minu")
-                                (umax "maxu")
-                                (clz "clz")
-                                (ctz "ctz")
-                                (popcount "cpop")])
-
-(define_mode_attr shiftm1 [(SI "const31_operand") (DI "const63_operand")])
-
 ;; ZBA extension.
 
 (define_insn "*zero_extendsidi2_bitmanip"
index 55c8bddb641ddf3b8f1784a0443b1a5ec1676c59..cb57ac7cb7b39733f1446f162c950083659a43f3 100644 (file)
 ;; the controlling mode.
 (define_mode_attr HALFMODE [(DF "SI") (DI "SI") (TF "DI")])
 
+; bitmanip mode attribute
+(define_mode_attr shiftm1 [(SI "const31_operand") (DI "const63_operand")])
+
 ;; -------------------------------------------------------------------
 ;; Code Iterators
 ;; -------------------------------------------------------------------
 (define_code_iterator any_lt [lt ltu])
 (define_code_iterator any_le [le leu])
 
+; bitmanip code iterators
+(define_code_iterator bitmanip_bitwise [and ior])
+
+(define_code_iterator bitmanip_minmax [smin umin smax umax])
+
+(define_code_iterator clz_ctz_pcnt [clz ctz popcount])
+
 ;; -------------------------------------------------------------------
 ;; Code Attributes
 ;; -------------------------------------------------------------------
 
-
 ;; <u> expands to an empty string when doing a signed operation and
 ;; "u" when doing an unsigned operation.
 (define_code_attr u [(sign_extend "") (zero_extend "u")
                        (plus "add")
                        (minus "sub")])
 
+; bitmanip code attributes
+(define_code_attr bitmanip_optab [(smin "smin")
+                                 (smax "smax")
+                                 (umin "umin")
+                                 (umax "umax")
+                                 (clz "clz")
+                                 (ctz "ctz")
+                                 (popcount "popcount")])
+(define_code_attr bitmanip_insn [(smin "min")
+                                (smax "max")
+                                (umin "minu")
+                                (umax "maxu")
+                                (clz "clz")
+                                (ctz "ctz")
+                                (popcount "cpop")])
+
 ;; -------------------------------------------------------------------
 ;; Int Iterators.
 ;; -------------------------------------------------------------------