Takayuki 'January June' Suwa 9eba97e412 xtensa: Implement "force_l32" target-specific attribute
The previous patch introduced the target-specific named address space
"__force_l32", but this reserved identifier can only be used from C.

Therefore, this patch introduces a new target-specific attribute
"force_l32," which is very similar to the named address space "__force_l32,"
making that feature usable not only in C but also in other languages.

     /* example */
     extern "C" {
       unsigned int test(const char *p) {
         for (const char __attribute__((force_l32)) *q = p; ; ++q)
           if (!*q)
             return q - p;
       }
     }

     ;; result (-Os -mlittle-endian)
     test:
     	entry	sp, 32
     	mov.n	a8, a2
     	movi.n	a10, -4
     .L3:
     	and	a9, a8, a10	;; *q : align to SImode
     	l32i.n	a9, a9, 0	;; *q : load:SI
     	ssa8l	a8		;; *q : shift to bit position 0
     	srl	a9, a9
     	extui	a9, a9, 0, 8	:: *q : zero_extract:QI
     	beqz.n	a9, .L5
     	addi.n	a8, a8, 1
     	j	.L3
     .L5:
     	sub	a2, a8, a2
     	retw.n

gcc/ChangeLog:

	* config/xtensa/xtensa.cc (xtensa_attribute_table,
	TARGET_ATTRIBUTE_TABLE):
	New definitions for target-specific attributes.
	(xtensa_expand_load_force_l32_1): New sub-function for inspecting
	the attribute from the specified MEM rtx.
	(xtensa_expand_load_force_l32): Add handlings for for addresses
	with offsets.
	(xtensa_handle_force_l32_attribute_1,
	xtensa_handle_force_l32_attribute):
	New functions for handling the attribute.
2026-05-04 00:28:23 -07:00
2026-04-15 08:16:45 +00:00
2026-05-01 00:16:27 +00:00
2026-04-22 00:16:28 +00:00
2026-04-24 00:16:27 +00:00
2026-04-18 00:16:31 +00:00
2026-04-22 00:16:28 +00:00
2026-04-29 00:16:40 +00:00
2026-04-22 00:16:28 +00:00
2026-04-30 00:16:31 +00:00
2026-05-03 00:16:23 +00:00
2026-04-23 00:16:32 +00:00
2026-05-02 00:16:28 +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%