/* If doing stack clash protection then we use a loop to allocate and probe
the stack. */
- if (flag_stack_clash_protection && !epilogue)
+ if (flag_stack_clash_protection)
{
+ if (epilogue)
+ {
+ insn = emit_insn (gen_add3_insn (target, target, adjust_size));
+
+ if (!frame_pointer_needed)
+ {
+ add_reg_note (insn, REG_CFA_DEF_CFA,
+ plus_constant (Pmode, stack_pointer_rtx, -offset));
+ RTX_FRAME_RELATED_P (insn) = 1;
+ }
+
+ return;
+ }
+
HOST_WIDE_INT min_probe_threshold
= (1 << param_stack_clash_protection_guard_size) - STACK_CLASH_CALLER_GUARD;
if (!frame_pointer_needed)
{
add_reg_note (insn, REG_CFA_DEF_CFA,
- plus_constant (Pmode, stack_pointer_rtx, -offset));
+ plus_constant (Pmode, stack_pointer_rtx, offset));
RTX_FRAME_RELATED_P (insn) = 1;
}
/* { dg-final { scan-assembler-times {mv\tt3,sp} 1 } } */
/* { dg-final { scan-assembler-times {\.cfi_def_cfa [0-9]+, 0} 1 } } */
-/* { dg-final { scan-assembler-times {\.cfi_escape 0xf,0xa,0x72,0,0x92,0xa2,0x38,0,0x9,0xec,0x1e,0x22} 1 } } */
+/* { dg-final { scan-assembler-times {\.cfi_escape 0xf,0x9,0x72,0,0x92,0xa2,0x38,0,0x3a,0x1e,0x22} 1 } } */
+/* { dg-final { scan-assembler-times {\.cfi_escape 0xf,0xa,0x72,0,0x92,0xa2,0x38,0,0x9,0xf6,0x1e,0x22} 1 } } */