Xi Ruoyao 8c8b40e1c8 LoongArch: Allow -mcmodel=extreme and model attribute with -mexplicit-relocs=auto
There seems no real reason to require -mexplicit-relocs=always for
-mcmodel=extreme or model attribute.  As the linker does not know how to
relax a 3-operand la.local or la.global pseudo instruction, just emit
explicit relocs for SYMBOL_PCREL64, and under TARGET_CMODEL_EXTREME also
SYMBOL_GOT_DISP.

gcc/ChangeLog:

	* config/loongarch/loongarch.cc (loongarch_explicit_relocs_p):
	Return true for SYMBOL_PCREL64.  Return true for SYMBOL_GOT_DISP
	if TARGET_CMODEL_EXTREME.
	(loongarch_split_symbol): Check for la_opt_explicit_relocs !=
	EXPLICIT_RELOCS_NONE instead of TARGET_EXPLICIT_RELOCS.
	(loongarch_print_operand_reloc): Likewise.
	(loongarch_option_override_internal): Likewise.
	(loongarch_handle_model_attribute): Likewise.
	* doc/invoke.texi (-mcmodel=extreme): Update the compatibility
	between it and -mexplicit-relocs=.

gcc/testsuite/ChangeLog:

	* gcc.target/loongarch/attr-model-3.c: New test.
	* gcc.target/loongarch/attr-model-4.c: New test.
	* gcc.target/loongarch/func-call-extreme-3.c: New test.
	* gcc.target/loongarch/func-call-extreme-4.c: New test.
2023-12-12 15:37:04 +08:00
2023-12-01 00:17:36 +00:00
2023-12-03 00:16:41 +00:00
2023-12-11 00:17:32 +00:00
2023-12-01 00:17:36 +00:00
2023-12-07 00:17:06 +00:00
2023-12-12 00:17:22 +00:00
2023-12-12 00:17:22 +00:00
2023-12-01 00:17:36 +00:00
2023-12-12 00:17:22 +00:00
2023-12-06 00:17:50 +00:00
2023-12-12 00:17:22 +00:00
2023-12-10 00:16:47 +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.8%
C 30.2%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.3%