Commit c705e5a3 by Segher Boessenkool

Subject: [PATCH] rs6000: Fix crash with big stack clash interval (PR82674)

If the user asks for a stack clash probe interval of 64kB, we currently
generate a "stdu rX,-65536(r1)" instruction.  That instruction does not
exist (the offset is a 16-bit signed number).  If the offset is too big
we should force it into a register and generate a "stdux rX,rY,r1"
instruction, instead.


	PR target/82674
	* config/rs6000/rs6000.md (allocate_stack): Force update interval
	into a register if it does not fit into an immediate offset field.

From-SVN: r254252
parent 4db58158
2017-10-31 Segher Boessenkool <segher@kernel.crsahing.org>
PR target/82674
* config/rs6000/rs6000.md (allocate_stack): Force update interval
into a register if it does not fit into an immediate offset field.
2017-10-31 Olivier Hainque <hainque@adacore.com>
* gcc/Makefile.in (FLAGS_TO_PASS): Pass libsubdir as well.
2017-11-01 Julia Koval <julia.koval@intel.com>
2017-10-31 Julia Koval <julia.koval@intel.com>
* config.gcc: Add gfniintrin.h.
* config/i386/gfniintrin.h: New.
......@@ -10333,6 +10333,9 @@
{
rtx loop_lab, end_loop;
bool rotated = CONST_INT_P (rounded_size);
rtx update = GEN_INT (-probe_interval);
if (probe_interval > 32768)
update = force_reg (Pmode, update);
emit_stack_clash_protection_probe_loop_start (&loop_lab, &end_loop,
last_addr, rotated);
......@@ -10340,13 +10343,11 @@
if (Pmode == SImode)
emit_insn (gen_movsi_update_stack (stack_pointer_rtx,
stack_pointer_rtx,
GEN_INT (-probe_interval),
chain));
update, chain));
else
emit_insn (gen_movdi_di_update_stack (stack_pointer_rtx,
stack_pointer_rtx,
GEN_INT (-probe_interval),
chain));
update, chain));
emit_stack_clash_protection_probe_loop_end (loop_lab, end_loop,
last_addr, rotated);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment