Blame SOURCES/gcc48-rh1537828-1.patch
|
|
001c85 |
2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
|
|
|
001c85 |
|
|
|
001c85 |
PR target/85287
|
|
|
001c85 |
* gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
|
|
|
001c85 |
for stack clash protection in a register whenever we need it to be in
|
|
|
001c85 |
a register.
|
|
|
001c85 |
|
|
|
001c85 |
|
|
|
001c85 |
--- a/gcc/config/rs6000/rs6000.md 2018/04/10 21:09:30 259298
|
|
|
001c85 |
+++ b/gcc/config/rs6000/rs6000.md 2018/04/10 21:37:34 259299
|
|
|
001c85 |
@@ -9783,14 +9783,12 @@
|
|
|
001c85 |
/* Now handle residuals. We just have to set operands[1] correctly
|
|
|
001c85 |
and let the rest of the expander run. */
|
|
|
001c85 |
operands[1] = residual;
|
|
|
001c85 |
- if (!CONST_INT_P (residual))
|
|
|
001c85 |
- operands[1] = force_reg (Pmode, operands[1]);
|
|
|
001c85 |
}
|
|
|
001c85 |
|
|
|
001c85 |
- if (GET_CODE (operands[1]) != CONST_INT
|
|
|
001c85 |
- || INTVAL (operands[1]) < -32767
|
|
|
001c85 |
- || INTVAL (operands[1]) > 32768)
|
|
|
001c85 |
+ if (!(CONST_INT_P (operands[1])
|
|
|
001c85 |
+ && IN_RANGE (INTVAL (operands[1]), -32767, 32768)))
|
|
|
001c85 |
{
|
|
|
001c85 |
+ operands[1] = force_reg (Pmode, operands[1]);
|
|
|
001c85 |
neg_op0 = gen_reg_rtx (Pmode);
|
|
|
001c85 |
if (TARGET_32BIT)
|
|
|
001c85 |
emit_insn (gen_negsi2 (neg_op0, operands[1]));
|
|
|
001c85 |
@@ -9798,7 +9796,7 @@
|
|
|
001c85 |
emit_insn (gen_negdi2 (neg_op0, operands[1]));
|
|
|
001c85 |
}
|
|
|
001c85 |
else
|
|
|
001c85 |
- neg_op0 = GEN_INT (- INTVAL (operands[1]));
|
|
|
001c85 |
+ neg_op0 = GEN_INT (-INTVAL (operands[1]));
|
|
|
001c85 |
|
|
|
001c85 |
insn = emit_insn ((* ((TARGET_32BIT) ? gen_movsi_update_stack
|
|
|
001c85 |
: gen_movdi_di_update_stack))
|
|
|
001c85 |
|