diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2015-10-02 03:29:26 +0200 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2015-10-02 03:29:26 +0200 |
commit | 636172b5bebed879968b5a5b3e6fa25c718d53b7 (patch) | |
tree | fe5d904153fd085c40646af0676d98536020e37e /gcc/fortran/trans-array.c | |
parent | d30ecc9c2bc9fc8373433302c9e351d545eed061 (diff) | |
download | gcc-636172b5bebed879968b5a5b3e6fa25c718d53b7.zip gcc-636172b5bebed879968b5a5b3e6fa25c718d53b7.tar.gz gcc-636172b5bebed879968b5a5b3e6fa25c718d53b7.tar.bz2 |
rs6000: Add "cannot_copy" attribute, use it (PR67788, PR67789)
After the shrink-wrapping patches the prologue will often be pushed
"deeper" into the function, which in turn means the software trace cache
pass will more often want to duplicate the basic block containing the
prologue. This caused failures for 32-bit SVR4 with -msecure-plt PIC.
This configuration uses the load_toc_v4_PIC_1 instruction, which creates
assembler labels without using the normal machinery for that. If now
the compiler decides to duplicate the insn, it will emit the same label
twice. Boom.
It isn't so easy to fix this to use labels the compiler knows about (let
alone test that properly). Instead, this patch wires up a "cannot_copy"
attribute to be used by TARGET_CANNOT_COPY_P, and sets that attribute on
these insns we do not want copied.
2015-10-01 Segher Boessenkool <segher@kernel.crashing.org>
PR target/67788
PR target/67789
* config/rs6000/rs6000.c (TARGET_CANNOT_COPY_INSN_P): New.
(rs6000_cannot_copy_insn_p): New function.
* config/rs6000/rs6000.md (cannot_copy): New attribute.
(load_toc_v4_PIC_1_normal): Set cannot_copy.
(load_toc_v4_PIC_1_476): Ditto.
gcc/testsuite/
PR target/67788
PR target/67789
* gcc.target/powerpc/pr67789.c: New testcase.
From-SVN: r228366
Diffstat (limited to 'gcc/fortran/trans-array.c')
0 files changed, 0 insertions, 0 deletions