gnu/gcc/6fdff4d4d8a83a02cb29c6f7db5446a788a43502 Back port PR target/120681
When I implemented the pc-relative support for power10 in GCC, I
disabled using pc-relative support for -mcmodel=large. At the time, I
didn't want to dig into the issues. It is now time to allow
-mcmodel=large to generate pc-relative code.
This patch allows -mcmodel=large to use prefixed addressing on power10,
power11, and possibly other future PowerPC processors in addition to
the current -mcmodel=medium support.
This change was back ported from the changes to the master branch on
2026-08-07.
2026-08-27 Michael Meissner <meissner@linux.ibm.com>
gcc/
PR target/120681
* config/rs6000/linux64.h (PCREL_SUPPORTED_BY_OS): Allow large
code model as well as medium code model.
* config/rs6000/rs6000.cc (rs6000_option_override_internal):
Likewise.
(rs6000_elf_declare_function_name): Don't create the
local/non-local labels for large code model if we are using
PC-relative addressing.
gcc/testsuite/
PR target/120681
* gcc.target/powerpc/pr120681.c: New test.
3 files changed