PR target/80969 - Fix ICE with -mabi=ms -mavx512f, reduce wasted space when realignin...
authorDaniel Santos <daniel.santos@pobox.com>
Wed, 23 Aug 2017 21:46:14 +0000 (21:46 +0000)
committerDaniel Santos <dansan@gcc.gnu.org>
Wed, 23 Aug 2017 21:46:14 +0000 (21:46 +0000)
commit122f9da15d1db58bd5f96a8a49d81d529ca07a1e
tree3e22ff025c943b2613b1046be2eb62d27a8237a4
parent9e931c2a2819523ce7847b622eaf8ae5f740744e
PR target/80969 - Fix ICE with -mabi=ms -mavx512f, reduce wasted space when realigning stack.

2017-08-23  Daniel Santos  <daniel.santos@pobox.com>

* config/i386/i386.h (ix86_frame::stack_realign_allocate_offset):
Remove field.
(ix86_frame::stack_realign_allocate): New field.
(struct machine_frame_state): Modify comments.
(machine_frame_state::sp_realigned_fp_end): New field.
* config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame
layout calculation.
(sp_valid_at): Add assertion to assure no attempt to access invalid
offset of a realigned stack.
(fp_valid_at): Likewise.
(choose_baseaddr): Modify comments.
(ix86_emit_outlined_ms2sysv_save): Adjust to changes in
ix86_expand_prologue.
(ix86_expand_prologue): Modify stack realignment and allocation.
(ix86_expand_epilogue): Modify comments.
* doc/sourcebuild.texi: Add documentation for target selectors avx2,
avx2_runtime, avx512f, and avx512f_runtime.

2017-08-23  Daniel Santos  <daniel.santos@pobox.com>

* gcc.target/i386/pr80969-1.c: New testcase.
* gcc.target/i386/pr80969-2a.c: Likewise.
* gcc.target/i386/pr80969-2.c: Likewise.
* gcc.target/i386/pr80969-3.c: Likewise.
* gcc.target/i386/pr80969-4a.c: Likewise.
* gcc.target/i386/pr80969-4b.c: Likewise.
* gcc.target/i386/pr80969-4.c: Likewise.
* gcc.target/i386/pr80969-4.h: New header common to pr80969-4*.c
* lib/target-supports.exp (check_avx512_os_support_available,
check_avx512f_hw_available, check_effective_target_avx512f_runtime):
New proceedures for target avx512f and avx512f_runtime selectors.
(check_avx2_hw_available): Fix breakage due NULL being undefined.

From-SVN: r251321
14 files changed:
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr80969-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr80969-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr80969-2a.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr80969-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr80969-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr80969-4.h [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr80969-4a.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr80969-4b.c [new file with mode: 0644]
gcc/testsuite/lib/target-supports.exp