https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110320
Bug ID: 110320 Summary: ELFv2 pc-rel ABI extension allows using r2 as a volatile register Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: bergner at gcc dot gnu.org Target Milestone: --- The PC-Relative ABI extension to the ELFv2 ABI defines register r2 (normally the TOC register in ELFv1 & ELFv2) as a volatile register available for use in the register allocator. Currently GCC doesn't make use of that fact, so this is a missed-optimization opportunity.