Georg-Johann Lay a074780fce AVR: Overhaul add and sub insns that extend one operand.
These are insns of the forms

  (set (regA:M)
       (plus:M (extend:M (regB:L))
               (regA:M)))
and

  (set (regA:M)
       (minus:M (regA:M)
                (extend:M (regB:L))))

where "extend" may be a sign-extend or zero-extend,
and the integer modes are  SImode >= M > L >= QImode.

The existing patterns are now represented in terms of insns
with mode iterators and a code iterator over any_extend,
and these new insn support all valid combinations of M and L
(which previously was not the case).

gcc/
	* config/avr/avr.cc (avr_out_minus): Assimilate into...
	(avr_out_plus_ext): ...this new function.
	(avr_adjust_insn_length) [ADJUST_LEN_PLUS_EXT]: Handle case.
	(avr_rtx_costs_1) [PLUS, MINUS]: Adjust RTX costs.
	* config/avr/avr.md (adjust_len) <plus_ext>: Add new attribute value.
	(*addpsi3_zero_extend.hi_split): Assimilate...
	(*addpsi3_zero_extend.qi_split): Assimilate...
	(*addsi3_zero_extend_split): Assimilate...
	(*addsi3_zero_extend.hi_split): Assimilate...
	(*addpsi3_sign_extend.hi_split): Assimilate...
	(*addhi3.sign_extend1_split): Assimilate...
	(*add<PSISI:mode>3.<code>.<QIPSI:mode>_split): ...into this
	new insn-and-split.
	(*addpsi3_zero_extend.hi): Assimilate...
	(*addpsi3_zero_extend.qi): Assimilate...
	(*addsi3_zero_extend): Assimilate...
	(*addsi3_zero_extend.hi): Assimilate...
	(*addpsi3_sign_extend.hi): Assimilate...
	(*addhi3.sign_extend1): Assimilate...
	(*add<PSISI:mode>3.<code>.<QIPSI:mode>): ...into this new insn.
	(*subpsi3_sign_extend.hi_split): Assimilate...
	(*subhi3.sign_extend2_split): Assimilate...
	(*sub<HISI:mode>3.zero_extend.<QIPSI:mode>_split): Assimilate...
	(*sub<HISI:mode>3.<code><QIPSI:mode>_split): ...into this new
	insn-and-split.
	(*subpsi3_sign_extend.hi): Assimilate...
	(*subhi3.sign_extend2): Assimilate...
	(*sub<HISI:mode>3.zero_extend.<QIPSI:mode>): Assimilate...
	(*sub<HISI:mode>3.<code>.<QIPSI:mode>): ...into this new insn.
	(*sub<HISI:mode>3.zero_extend.<QIPSI:mode>): Use avr_out_plus_ext
	for asm out.
	* config/avr/avr-protos.h (avr_out_minus): Remove.
	(avr_out_plus_ext): New proto.
gcc/testsuite/
	* gcc.target/avr/torture/add-extend.c: New test.
	* gcc.target/avr/torture/sub-extend.c: New test.
2024-07-16 16:29:49 +02:00
2024-07-14 00:16:33 +00:00
2024-07-12 00:17:52 +00:00
2024-07-08 00:17:01 +00:00
2024-07-03 00:19:01 +00:00
2024-07-15 17:28:28 -07:00
2024-07-14 00:16:33 +00:00
2024-07-02 00:17:36 +00:00
2024-07-12 00:17:52 +00:00
2024-07-02 00:17:36 +00:00
2024-07-13 00:17:42 +00:00
2024-07-08 00:17:01 +00:00
2024-07-14 00:16:33 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 4.2 GiB
Languages
C++ 30.7%
C 30.2%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.4%