From 6d1ea02a6c3423a000c0d894b2ff673757042398 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 12 Jun 2017 19:30:45 +0000 Subject: [PATCH] More refinements to fixing sparc's PR target/80968. gcc/ PR target/80968 * config/sparc/sparc.md (return expander): Emit frame blockage if function uses alloca. From-SVN: r249134 --- gcc/ChangeLog | 6 ++++++ gcc/config/sparc/sparc.md | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc5435d54a6..9be291e3d2a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-06-12 David S. Miller + + PR target/80968 + * config/sparc/sparc.md (return expander): Emit frame blockage if + function uses alloca. + 2017-06-12 Richard Sandiford * combine.c (make_field_assignment): Check len rather than the mode diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index 737bdb37543..5c5096bca2a 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -7098,7 +7098,10 @@ (define_expand "return" [(return)] "sparc_can_use_return_insn_p ()" - "") +{ + if (cfun->calls_alloca) + emit_insn (gen_frame_blockage ()); +}) (define_insn "*return_internal" [(return)] -- 2.30.2