diff options
author | Andrew Pinski <apinski@marvell.com> | 2022-08-11 23:52:29 +0000 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2022-08-24 12:15:30 -0700 |
commit | 3f9061d95d5835ef0d3c46de1076d62d27513e6b (patch) | |
tree | d3f5c3482728c99403dec1707ef8435469b385f3 /gcc/config | |
parent | 43e741478e3db0f319246475a585af51291b0101 (diff) | |
download | gcc-3f9061d95d5835ef0d3c46de1076d62d27513e6b.zip gcc-3f9061d95d5835ef0d3c46de1076d62d27513e6b.tar.gz gcc-3f9061d95d5835ef0d3c46de1076d62d27513e6b.tar.bz2 |
[RISCV] Move iterators from bitmanip.md to iterators.md
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.
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/riscv/bitmanip.md | 25 | ||||
-rw-r--r-- | gcc/config/riscv/iterators.md | 27 |
2 files changed, 26 insertions, 26 deletions
diff --git a/gcc/config/riscv/bitmanip.md b/gcc/config/riscv/bitmanip.md index c438328..6317fed 100644 --- a/gcc/config/riscv/bitmanip.md +++ b/gcc/config/riscv/bitmanip.md @@ -17,31 +17,6 @@ ;; 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" diff --git a/gcc/config/riscv/iterators.md b/gcc/config/riscv/iterators.md index 55c8bdd..cb57ac7 100644 --- a/gcc/config/riscv/iterators.md +++ b/gcc/config/riscv/iterators.md @@ -112,6 +112,9 @@ ;; 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 ;; ------------------------------------------------------------------- @@ -147,11 +150,17 @@ (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") @@ -195,6 +204,22 @@ (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. ;; ------------------------------------------------------------------- |