]> gcc.gnu.org Git - gcc.git/commit
aarch64: Tweak handling of function literal pools
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 13 Apr 2022 08:56:07 +0000 (09:56 +0100)
committerMatthew Malcomson <matthew.malcomson@arm.com>
Thu, 5 May 2022 11:57:52 +0000 (12:57 +0100)
commitfc3b786a7ec6a9527e53e3e82bd392b3f100ee79
tree92099e66080dbd677599fa9ece900bc6f223cbeb
parent72516f7de292369b58cb004927733fb286b01be7
aarch64: Tweak handling of function literal pools

We use AArch32-style text literal pools if:

- -mpc-relative-literal-loads is passed explicitly or
- the code model is “large”

In other cases we put constant pool entries in the data section.
The “tiny” code model then uses PC-relative addressing to access
these data section entries, whereas the “small” model uses a
hi/lo split.

However, we must never put a “real” capability into a text literal pool,
since that would require the text section to be relocated at runtime.
The decision therefore needs to become constant-specific.
gcc/config/aarch64/aarch64.c
gcc/testsuite/gcc.target/aarch64/morello/pcrel-literal-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/morello/pcrel-literal-2.c [new file with mode: 0644]
This page took 0.064207 seconds and 6 git commands to generate.