aboutsummaryrefslogtreecommitdiff
path: root/gcc/explow.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2017-12-13 23:16:56 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2017-12-13 23:16:56 +0000
commitb9f92c0bb7fc0c319b0a2d54b6a74e8f49c469bd (patch)
tree6a7f304d8ee14fef74899d293496f9f886e83325 /gcc/explow.c
parentf4615940b171c449a0e799195dbd28041f677f35 (diff)
downloadgcc-b9f92c0bb7fc0c319b0a2d54b6a74e8f49c469bd.zip
gcc-b9f92c0bb7fc0c319b0a2d54b6a74e8f49c469bd.tar.gz
gcc-b9f92c0bb7fc0c319b0a2d54b6a74e8f49c469bd.tar.bz2
re PR middle-end/78468 (libgomp.c/reduction-10.c and many more FAIL)
PR middle-end/78468 * emit-rtl.c (init_emit): Remove ??? comment. * explow.c (get_dynamic_stack_size): Take known alignment of stack pointer + STACK_DYNAMIC_OFFSET into account in lieu of STACK_BOUNDARY. * config/sparc/sparc.h (INIT_EXPANDERS): In 32-bit mode, lower the alignment of 3 virtual registers to BITS_PER_WORD. * config/sparc/sparc.c (sparc_compute_frame_size): Simplify. Co-Authored-By: Dominik Vogt <vogt@linux.vnet.ibm.com> From-SVN: r255616
Diffstat (limited to 'gcc/explow.c')
-rw-r--r--gcc/explow.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index e2c8e45..696f066 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -1206,7 +1206,6 @@ get_dynamic_stack_size (rtx *psize, unsigned size_align,
unsigned required_align,
HOST_WIDE_INT *pstack_usage_size)
{
- unsigned extra = 0;
rtx size = *psize;
/* Ensure the size is in the proper mode. */
@@ -1242,16 +1241,16 @@ get_dynamic_stack_size (rtx *psize, unsigned size_align,
example), so we must preventively align the value. We leave space
in SIZE for the hole that might result from the alignment operation. */
- /* Since the stack is presumed to be aligned before this allocation,
- we only need to increase the size of the allocation if the required
- alignment is more than the stack alignment. */
- if (required_align > STACK_BOUNDARY)
+ unsigned known_align = REGNO_POINTER_ALIGN (VIRTUAL_STACK_DYNAMIC_REGNUM);
+ if (known_align == 0)
+ known_align = BITS_PER_UNIT;
+ if (required_align > known_align)
{
- extra = (required_align - STACK_BOUNDARY) / BITS_PER_UNIT;
+ unsigned extra = (required_align - known_align) / BITS_PER_UNIT;
size = plus_constant (Pmode, size, extra);
size = force_operand (size, NULL_RTX);
- if (size_align > STACK_BOUNDARY)
- size_align = STACK_BOUNDARY;
+ if (size_align > known_align)
+ size_align = known_align;
if (flag_stack_usage_info && pstack_usage_size)
*pstack_usage_size += extra;