From: Jeff Law Date: Thu, 21 Sep 2017 22:03:59 +0000 (-0600) Subject: i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix dump output if the only stack... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1debe7ea0aa0672d560b7671c0a7f8400432f727;p=gcc.git i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix dump output if the only stack space is for pushed registers. * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix dump output if the only stack space is for pushed registers. * lib/target-supports.exp (check_effective_target_frame_pointer_for_non_leaf): Add case for x86 Solaris. From-SVN: r253082 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36d5ec05a1f..26c388b3565 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-09-21 Jeff Law + + * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): + Fix dump output if the only stack space is for pushed registers. + 2017-09-21 Richard Sandiford * config/spu/spu.c (spu_sched_adjust_cost): Update after renaming diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index aeafd0d5d21..270ee557872 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -13946,7 +13946,13 @@ ix86_adjust_stack_and_probe_stack_clash (const HOST_WIDE_INT size) no probes are needed. */ if (!size) { - dump_stack_clash_frame_info (NO_PROBE_NO_FRAME, false); + /* However, the allocation of space via pushes for register + saves could be viewed as allocating space, but without the + need to probe. */ + if (m->frame.nregs || m->frame.nsseregs || frame_pointer_needed) + dump_stack_clash_frame_info (NO_PROBE_SMALL_FRAME, true); + else + dump_stack_clash_frame_info (NO_PROBE_NO_FRAME, false); return; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7b4805218c0..04f0c186635 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-09-21 Rainer Orth + + * lib/target-supports.exp + (check_effective_target_frame_pointer_for_non_leaf): Add + case for x86 Solaris. + 2017-09-21 Paul Thomas PR fortran/78512 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index b7fe5c0d724..887a801bbd8 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -8657,6 +8657,12 @@ proc check_effective_target_frame_pointer_for_non_leaf { } { if { [istarget aarch*-*-*] } { return 1 } + + # Solaris/x86 defaults to -fno-omit-frame-pointer. + if { [istarget i?86-*-solaris*] || [istarget x86_64-*-solaris*] } { + return 1 + } + return 0 }