diff options
author | Xi Ruoyao <xry111@xry111.site> | 2023-12-07 15:45:30 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2023-12-12 15:37:04 +0800 |
commit | 8c8b40e1c8bb4fbfba850bca47c768d99d12bef4 (patch) | |
tree | 7e19cffab3008de797816ef4ef00d9b0a3820b26 /gcc/fortran | |
parent | f5f33b44b5dd4c41ae335445ae3f06b1ca3cfbcb (diff) | |
download | gcc-8c8b40e1c8bb4fbfba850bca47c768d99d12bef4.zip gcc-8c8b40e1c8bb4fbfba850bca47c768d99d12bef4.tar.gz gcc-8c8b40e1c8bb4fbfba850bca47c768d99d12bef4.tar.bz2 |
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.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions