r256436 - in /trunk/gcc: ChangeLog config/i386/...

hjl@gcc.gnu.org hjl@gcc.gnu.org
Wed Jan 10 15:37:00 GMT 2018


Author: hjl
Date: Wed Jan 10 15:37:49 2018
New Revision: 256436

URL: https://gcc.gnu.org/viewcvs?rev=256436&root=gcc&view=rev
Log:
i386: Also adjust stack frame for stack slot alignment

We should also adjust stack_realign_offset for the largest alignment of
stack slot actually used when stack realignment isn't needed.  This is
required to keep stack frame properly aligned to satisfy the largest
alignment of stack slots.

Tested on Linux/i686 and Linux/x86-64.

gcc/

	PR target/83735
	* config/i386/i386.c (ix86_compute_frame_layout): Always adjust
	stack_realign_offset for the largest alignment of stack slot
	actually used.
	(ix86_find_max_used_stack_alignment): New function.
	(ix86_finalize_stack_frame_flags): Use it.  Set
	max_used_stack_alignment if we don't realign stack.
	* config/i386/i386.h (machine_function): Add
	max_used_stack_alignment.

gcc/testsuite/

	PR target/83735
	* gcc.target/i386/pr83735.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr83735.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/config/i386/i386.h
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list