+2016-08-23 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * explow.c (get_dynamic_stack_size): Take known alignment of stack
+ pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
+ needed.
+ Correct a typo in a comment.
+
2016-08-23 Dominik Vogt <vogt@linux.vnet.ibm.com>
* config/s390/s390.md ("*andc_split"): New splitter for and with
example), so we must preventively align the value. We leave space
in SIZE for the hole that might result from the alignment operation. */
- extra = (required_align - BITS_PER_UNIT) / BITS_PER_UNIT;
- size = plus_constant (Pmode, size, extra);
- size = force_operand (size, NULL_RTX);
+ 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 - known_align) / BITS_PER_UNIT;
+ size = plus_constant (Pmode, size, extra);
+ size = force_operand (size, NULL_RTX);
+ }
if (flag_stack_usage_info && pstack_usage_size)
*pstack_usage_size += extra;
size_align = BITS_PER_UNIT;
/* Round the size to a multiple of the required stack alignment.
- Since the stack if presumed to be rounded before this allocation,
+ Since the stack is presumed to be rounded before this allocation,
this will maintain the required alignment.
If the stack grows downward, we could save an insn by subtracting