commit 233a9def5cd0b70f1288ff57ce67d9d5d5d7f845 Author: law Date: Thu Sep 21 22:03:59 2017 +0000 * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253082 138bc75d-0d04-0410-961f-82ee72b054a4 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 5aff9b9d113..086848b2c73 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -13287,7 +13287,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/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index e9f03886ca6..cb58a2be35f 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -8403,6 +8403,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 }