i386: Set cfun->machine->max_used_stack_alignment if needed
authorH.J. Lu <hongjiu.lu@intel.com>
Sun, 5 Aug 2018 12:46:13 +0000 (12:46 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Sun, 5 Aug 2018 12:46:13 +0000 (05:46 -0700)
commit91539305a849cc8d8e8efb0d98e8c12541992916
tree6e9f8447a678e471c58e8c92a8b0d8778966d653
parent7ff1e4e9c0527252fd427ee751efad30d391c8be
i386: Set cfun->machine->max_used_stack_alignment if needed

cfun->machine->max_used_stack_alignment is used to decide how stack frame
should be aligned.  This is independent of any psABIs nor 32-bit vs 64-bit.
It is always safe to compute max_used_stack_alignment.  We compute it only
if 128-bit aligned load/store may be generated on misaligned stack slot
which will lead to segfault.

gcc/

PR target/86386
* config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
cfun->machine->max_used_stack_alignment if needed.

gcc/testsuite/

PR target/86386
* gcc.target/i386/pr86386.c: New file.

From-SVN: r263317
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr86386.c [new file with mode: 0644]