gcc/gcc/config/rs6000
Segher Boessenkool 5c956beb8a rs6000: Don't touch below the stack pointer (PR77687)
With the 32-bit SVR4 ABI we don't have a red zone, so we have to restore
the callee-saved registers before we restore the stack pointer.

The previous fix for this PR failed in two ways, for huge frames: first,
we use a negative offset from r11 in that case, so the (mem:BLK 11) access
does no good; second, sched does not handle accesses to mem:BLK correctly
in this case (does not make dependencies).

This patch fixes it by doing a store to (mem:BLK (scratch)) instead.
This means no unrelated (not to stack) loads/stores can be moved over the
stack restore either, but so be it.


	PR target/77687
	* config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
	address instead of to r1 and r11.

gcc/testsuite/
	PR target/77687
	* gcc.target/powerpc/pr77687.c: New testcase.

From-SVN: r254968
2017-11-20 21:10:28 +01:00
..
6xx.md Update copyright years. 2017-01-01 13:07:43 +01:00
7xx.md Update copyright years. 2017-01-01 13:07:43 +01:00
40x.md Update copyright years. 2017-01-01 13:07:43 +01:00
440.md Update copyright years. 2017-01-01 13:07:43 +01:00
476.h Update copyright years. 2017-01-01 13:07:43 +01:00
476.md Update copyright years. 2017-01-01 13:07:43 +01:00
476.opt Update copyright years. 2017-01-01 13:07:43 +01:00
601.md Update copyright years. 2017-01-01 13:07:43 +01:00
603.md Update copyright years. 2017-01-01 13:07:43 +01:00
750cl.h Update copyright years. 2017-01-01 13:07:43 +01:00
7450.md Update copyright years. 2017-01-01 13:07:43 +01:00
8540.md Update copyright years. 2017-01-01 13:07:43 +01:00
a2.md Update copyright years. 2017-01-01 13:07:43 +01:00
aix-stdint.h Update copyright years. 2017-01-01 13:07:43 +01:00
aix.h re PR tree-optimization/79256 (FAIL: gcc.dg/vect/pr25413a.c execution test) 2017-02-07 11:29:06 +00:00
aix43.h Update copyright years. 2017-01-01 13:07:43 +01:00
aix51.h Update copyright years. 2017-01-01 13:07:43 +01:00
aix52.h Update copyright years. 2017-01-01 13:07:43 +01:00
aix53.h Update copyright years. 2017-01-01 13:07:43 +01:00
aix61.h Update copyright years. 2017-01-01 13:07:43 +01:00
aix64.opt Update copyright years. 2017-01-01 13:07:43 +01:00
aix71.h Update copyright years. 2017-01-01 13:07:43 +01:00
altivec.h re PR target/79963 (vec_eq_any extracts wrong CR bit when compiling with -mcpu=power9) 2017-03-20 18:05:00 +00:00
altivec.md backport: re PR target/81833 (PowerPC: VSX: Miscompiles ffmpeg's scalarproduct_int16_vsx at -O1) 2017-09-12 21:02:13 +00:00
biarch64.h Update copyright years. 2017-01-01 13:07:43 +01:00
cell.md Update copyright years. 2017-01-01 13:07:43 +01:00
constraints.md re PR target/80123 (libgomp tests pr66199-2.c and pr66199-5.c fail with -mcpu=power9) 2017-03-22 12:47:55 -05:00
crypto.md Update copyright years. 2017-01-01 13:07:43 +01:00
darwin.h re PR tree-optimization/79256 (FAIL: gcc.dg/vect/pr25413a.c execution test) 2017-02-07 11:29:06 +00:00
darwin.md Update copyright years. 2017-01-01 13:07:43 +01:00
darwin.opt Update copyright years. 2017-01-01 13:07:43 +01:00
darwin7.h Update copyright years. 2017-01-01 13:07:43 +01:00
darwin8.h Update copyright years. 2017-01-01 13:07:43 +01:00
darwin64.h Update copyright years. 2017-01-01 13:07:43 +01:00
default64.h Update copyright years. 2017-01-01 13:07:43 +01:00
dfp.md re PR target/80246 (Builtin's for POWER's dxex[q] and diex[q] use the wrong types) 2017-03-30 14:57:20 -05:00
driver-rs6000.c Update copyright years. 2017-01-01 13:07:43 +01:00
e300c2c3.md Update copyright years. 2017-01-01 13:07:43 +01:00
e500.h Update copyright years. 2017-01-01 13:07:43 +01:00
e500mc.md Update copyright years. 2017-01-01 13:07:43 +01:00
e500mc64.md Update copyright years. 2017-01-01 13:07:43 +01:00
e5500.md Update copyright years. 2017-01-01 13:07:43 +01:00
e6500.md Update copyright years. 2017-01-01 13:07:43 +01:00
eabi.h Update copyright years. 2017-01-01 13:07:43 +01:00
eabialtivec.h Update copyright years. 2017-01-01 13:07:43 +01:00
eabisim.h Update copyright years. 2017-01-01 13:07:43 +01:00
eabispe.h Update copyright years. 2017-01-01 13:07:43 +01:00
freebsd.h Update copyright years. 2017-01-01 13:07:43 +01:00
freebsd64.h re PR tree-optimization/79256 (FAIL: gcc.dg/vect/pr25413a.c execution test) 2017-02-07 11:29:06 +00:00
genopt.sh Update copyright years. 2017-01-01 13:07:43 +01:00
host-darwin.c Update copyright years. 2017-01-01 13:07:43 +01:00
host-ppc64-darwin.c Update copyright years. 2017-01-01 13:07:43 +01:00
htm.md Update copyright years. 2017-01-01 13:07:43 +01:00
htmintrin.h Update copyright years. 2017-01-01 13:07:43 +01:00
htmxlintrin.h Update copyright years. 2017-01-01 13:07:43 +01:00
linux.h Update copyright years. 2017-01-01 13:07:43 +01:00
linux64.h re PR tree-optimization/79256 (FAIL: gcc.dg/vect/pr25413a.c execution test) 2017-02-07 11:29:06 +00:00
linux64.opt Update copyright years. 2017-01-01 13:07:43 +01:00
linuxaltivec.h Update copyright years. 2017-01-01 13:07:43 +01:00
linuxspe.h Update copyright years. 2017-01-01 13:07:43 +01:00
lynx.h Update copyright years. 2017-01-01 13:07:43 +01:00
milli.exp
mpc.md Update copyright years. 2017-01-01 13:07:43 +01:00
netbsd.h Update copyright years. 2017-01-01 13:07:43 +01:00
option-defaults.h Update copyright years. 2017-01-01 13:07:43 +01:00
paired.h Update copyright years. 2017-01-01 13:07:43 +01:00
paired.md Update copyright years. 2017-01-01 13:07:43 +01:00
power4.md Update copyright years. 2017-01-01 13:07:43 +01:00
power5.md Update copyright years. 2017-01-01 13:07:43 +01:00
power6.md Update copyright years. 2017-01-01 13:07:43 +01:00
power7.md Update copyright years. 2017-01-01 13:07:43 +01:00
power8.md Update copyright years. 2017-01-01 13:07:43 +01:00
power9.md power9.md (power9-alu): Remove 'cmp' type and add define_bypass for CR latency. 2017-01-19 17:11:34 +00:00
ppc-asm.h Update copyright years. 2017-01-01 13:07:43 +01:00
ppc-auxv.h backport: ppc-auxv.h (PPC_FEATURE2_DARN): New define. 2017-07-28 17:29:31 -05:00
ppu_intrinsics.h Update copyright years. 2017-01-01 13:07:43 +01:00
predicates.md backport: re PR target/80510 (Optimize Power7/power8 Altivec load/stores) 2017-05-26 01:52:24 +00:00
rs64.md Update copyright years. 2017-01-01 13:07:43 +01:00
rs6000-builtin.def rs6000-builtin.def (VMULEUB_UNS): Remove orphaned built-in. 2017-03-10 19:16:04 +00:00
rs6000-c.c backport: re PR target/82112 (internal compiler error: in fold_convert_loc, at fold-const.c:2262) 2017-09-15 13:24:49 +02:00
rs6000-cpus.def re PR target/80098 (ICE in curr_insn_transform, at lra-constraints.c:3816 on ppc64le) 2017-04-14 20:27:18 +00:00
rs6000-linux.c Update copyright years. 2017-01-01 13:07:43 +01:00
rs6000-modes.def Update copyright years. 2017-01-01 13:07:43 +01:00
rs6000-opts.h -mstack-protector-guard and friends (PR78875) 2017-01-17 23:02:42 +01:00
rs6000-passes.def Update copyright years. 2017-01-01 13:07:43 +01:00
rs6000-protos.h re PR target/78597 (test case gcc.dg/torture/fp-int-convert-float128-ieee.c (and others) fail starting with r242780) 2017-01-31 13:38:35 +00:00
rs6000-tables.opt Update copyright years. 2017-01-01 13:07:43 +01:00
rs6000.c PR81996, __builtin_return_address(0) fails 2017-09-21 22:25:37 +09:30
rs6000.h re PR target/80123 (libgomp tests pr66199-2.c and pr66199-5.c fail with -mcpu=power9) 2017-03-22 12:47:55 -05:00
rs6000.md rs6000: Don't touch below the stack pointer (PR77687) 2017-11-20 21:10:28 +01:00
rs6000.opt rs6000: Fix spelling of AltiVec in rs6000.opt (PR79397) 2017-02-08 10:59:55 +01:00
rtems.h [PowerPC/RTEMS] Enable -mcmodel option 2017-08-22 13:59:37 +00:00
secureplt.h Update copyright years. 2017-01-01 13:07:43 +01:00
si2vmx.h Update copyright years. 2017-01-01 13:07:43 +01:00
singlefp.h Update copyright years. 2017-01-01 13:07:43 +01:00
spe.h Update copyright years. 2017-01-01 13:07:43 +01:00
spe.md re PR target/78516 (ICE in lra_assign for e500v2) 2017-01-18 20:23:35 -06:00
spu2vmx.h Update copyright years. 2017-01-01 13:07:43 +01:00
sync.md rs6000: Enforce quad_address_p in TImode atomic_load/store (PR80382) 2017-04-12 10:31:40 +02:00
sysv4.h [RS6000] linux startfile/endfile 2017-08-29 17:53:44 +09:30
sysv4.opt Update copyright years. 2017-01-01 13:07:43 +01:00
sysv4le.h Update copyright years. 2017-01-01 13:07:43 +01:00
t-aix43 Update copyright years. 2017-01-01 13:07:43 +01:00
t-aix52 Update copyright years. 2017-01-01 13:07:43 +01:00
t-darwin8
t-darwin64
t-fprules Update copyright years. 2017-01-01 13:07:43 +01:00
t-freebsd64 Update copyright years. 2017-01-01 13:07:43 +01:00
t-linux
t-linux64 Update copyright years. 2017-01-01 13:07:43 +01:00
t-linux64bele
t-linux64le
t-linux64lebe
t-lynx Update copyright years. 2017-01-01 13:07:43 +01:00
t-netbsd Update copyright years. 2017-01-01 13:07:43 +01:00
t-ppccomm Update copyright years. 2017-01-01 13:07:43 +01:00
t-ppcendian Update copyright years. 2017-01-01 13:07:43 +01:00
t-ppcgas Update copyright years. 2017-01-01 13:07:43 +01:00
t-ppcos
t-rs6000 Update copyright years. 2017-01-01 13:07:43 +01:00
t-rtems [PowerPC/RTEMS] Add 64-bit support using ELFv2 ABI 2017-07-28 08:20:50 +00:00
t-spe Update copyright years. 2017-01-01 13:07:43 +01:00
t-vxworks Update copyright years. 2017-01-01 13:07:43 +01:00
t-vxworksae
t-vxworksmils
t-xilinx Update copyright years. 2017-01-01 13:07:43 +01:00
titan.md Update copyright years. 2017-01-01 13:07:43 +01:00
vec_types.h Update copyright years. 2017-01-01 13:07:43 +01:00
vector.md backports 2017-06-27 18:43:35 +02:00
vsx.md backport: re PR target/81593 (Optimize PowerPC vector set from vector extract) 2017-08-30 01:12:21 +00:00
vxworks.h Update copyright years. 2017-01-01 13:07:43 +01:00
vxworksae.h Update copyright years. 2017-01-01 13:07:43 +01:00
vxworksmils.h Update copyright years. 2017-01-01 13:07:43 +01:00
x-aix x-aix: Increase memory limit for genautomata on AIX. 2017-04-06 10:56:49 -06:00
x-darwin
x-darwin64
x-linux-relax
x-rs6000
xcoff.h Update copyright years. 2017-01-01 13:07:43 +01:00
xfpu.h Update copyright years. 2017-01-01 13:07:43 +01:00
xfpu.md Update copyright years. 2017-01-01 13:07:43 +01:00
xilinx.h Update copyright years. 2017-01-01 13:07:43 +01:00
xilinx.opt Update copyright years. 2017-01-01 13:07:43 +01:00