static void
aarch64_emit_probe_stack_range (HOST_WIDE_INT first, HOST_WIDE_INT size)
{
- rtx reg1 = gen_rtx_REG (ptr_mode, PROBE_STACK_FIRST_REG);
+ rtx reg1 = gen_rtx_REG (Pmode, PROBE_STACK_FIRST_REG);
/* See the same assertion on PROBE_INTERVAL above. */
gcc_assert ((first % ARITH_FACTOR) == 0);
const HOST_WIDE_INT base = ROUND_UP (size, ARITH_FACTOR);
emit_set_insn (reg1,
- plus_constant (ptr_mode,
+ plus_constant (Pmode,
stack_pointer_rtx, -(first + base)));
- emit_stack_probe (plus_constant (ptr_mode, reg1, base - size));
+ emit_stack_probe (plus_constant (Pmode, reg1, base - size));
}
/* The run-time loop is made up of 8 insns in the generic case while the
HOST_WIDE_INT i, rem;
emit_set_insn (reg1,
- plus_constant (ptr_mode,
+ plus_constant (Pmode,
stack_pointer_rtx,
-(first + PROBE_INTERVAL)));
emit_stack_probe (reg1);
for (i = 2 * PROBE_INTERVAL; i < size; i += PROBE_INTERVAL)
{
emit_set_insn (reg1,
- plus_constant (ptr_mode, reg1, -PROBE_INTERVAL));
+ plus_constant (Pmode, reg1, -PROBE_INTERVAL));
emit_stack_probe (reg1);
}
{
const HOST_WIDE_INT base = ROUND_UP (rem, ARITH_FACTOR);
- emit_set_insn (reg1, plus_constant (ptr_mode, reg1, -base));
- emit_stack_probe (plus_constant (ptr_mode, reg1, base - rem));
+ emit_set_insn (reg1, plus_constant (Pmode, reg1, -base));
+ emit_stack_probe (plus_constant (Pmode, reg1, base - rem));
}
else
- emit_stack_probe (plus_constant (ptr_mode, reg1, -rem));
+ emit_stack_probe (plus_constant (Pmode, reg1, -rem));
}
/* Otherwise, do the same as above, but in a loop. Note that we must be
equality test for the loop condition. */
else
{
- rtx reg2 = gen_rtx_REG (ptr_mode, PROBE_STACK_SECOND_REG);
+ rtx reg2 = gen_rtx_REG (Pmode, PROBE_STACK_SECOND_REG);
/* Step 1: round SIZE to the previous multiple of the interval. */
/* TEST_ADDR = SP + FIRST. */
emit_set_insn (reg1,
- plus_constant (ptr_mode, stack_pointer_rtx, -first));
+ plus_constant (Pmode, stack_pointer_rtx, -first));
/* LAST_ADDR = SP + FIRST + ROUNDED_SIZE. */
emit_set_insn (reg2,
- plus_constant (ptr_mode, stack_pointer_rtx,
+ plus_constant (Pmode, stack_pointer_rtx,
-(first + rounded_size)));
probes at FIRST + N * PROBE_INTERVAL for values of N from 1
until it is equal to ROUNDED_SIZE. */
- if (ptr_mode == DImode)
- emit_insn (gen_probe_stack_range_di (reg1, reg1, reg2));
- else
- emit_insn (gen_probe_stack_range_si (reg1, reg1, reg2));
+ emit_insn (gen_probe_stack_range (reg1, reg1, reg2));
/* Step 4: probe at FIRST + SIZE if we cannot assert at compile-time
{
const HOST_WIDE_INT base = ROUND_UP (rem, ARITH_FACTOR);
- emit_set_insn (reg2, plus_constant (ptr_mode, reg2, -base));
- emit_stack_probe (plus_constant (ptr_mode, reg2, base - rem));
+ emit_set_insn (reg2, plus_constant (Pmode, reg2, -base));
+ emit_stack_probe (plus_constant (Pmode, reg2, base - rem));
}
else
- emit_stack_probe (plus_constant (ptr_mode, reg2, -rem));
+ emit_stack_probe (plus_constant (Pmode, reg2, -rem));
}
}