diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-12-01 10:44:40 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-12-01 10:44:40 +0100 |
commit | 69157fe75823fc34f1e3265345f2d2b99cd8d380 (patch) | |
tree | 5847d5a087f989264c63d24f34215e294ff8787c /gcc/tree-pass.h | |
parent | 57fcbe579c2f2b0919486b658a5bec8f4e1ef42b (diff) | |
download | gcc-69157fe75823fc34f1e3265345f2d2b99cd8d380.zip gcc-69157fe75823fc34f1e3265345f2d2b99cd8d380.tar.gz gcc-69157fe75823fc34f1e3265345f2d2b99cd8d380.tar.bz2 |
x86_64: Fix up -fpic -mcmodel=large -fno-plt [PR98063]
On the following testcase with -fpic -mcmodel=large -fno-plt we emit
call puts@GOTPCREL(%rip)
but that is not really appropriate for CM_LARGE_PIC, the .text can be larger
than 2GB in that case and the .got slot further away from %rip than what can
fit into the signed 32-bit immediate.
The following patch computes the address of the .got slot the way it is
computed for that model for function pointer loads, and calls that.
2020-12-01 Jakub Jelinek <jakub@redhat.com>
PR target/98063
* config/i386/i386-expand.c (ix86_expand_call): Handle non-plt
CM_LARGE_PIC calls.
* gcc.target/i386/pr98063.c: New test.
Diffstat (limited to 'gcc/tree-pass.h')
0 files changed, 0 insertions, 0 deletions