From 1debe7ea0aa0672d560b7671c0a7f8400432f727 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 21 Sep 2017 16:03:59 -0600 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 8 +++++++- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/lib/target-supports.exp | 6 ++++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36d5ec0..26c388b 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 aeafd0d..270ee55 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 7b48052..04f0c18 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 b7fe5c0..887a801 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 } -- 2.7.4