When working on the Wine64 project to use aligned SSE MOVs after SP
realignment and adding -mcall-ms2sysv-xlogues, I overlooked the fact
that the function body may require a stack alignment greater than
16-bytes. This can result in an ICE with -mabi=ms -mavx512f and some
other cases. This patch set reworks the strategy for calculating the
frame layout following normal (inline) integral register saves (at
frame.reg_save_offset) to the start of the frame for the local function
(frame.frame_pointer_offset).
I've completed a bootstrap and full regression test with no additional
failures, but I don't have access to a machine with avx512 extensions.
I have manually run the tests that need it using the Intel SDE, but I
haven't been able to validate that my
check_effective_target_avx512f_runtime code in
gcc/testsuite/lib/target-supports.exp is correctly enabling the tests
for pr80969-4*.c.
As an aside note, I still have some rework of the ms-sysv.exp tests that
I haven't yet to submitted and in which I'm adding more tests for cases
with uncommon stacks, as in PR 81563.
Thanks,
Daniel
2017-07-23 Daniel Santos <daniel.san...@pobox.com>
* config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
(ix86_frame::stack_realign_allocate_offset): Likewise.
(ix86_frame::stack_realign_allocate): New field.
(struct machine_frame_state): Modify comments.
(machine_frame_state::sp_realigned_fp_end): New field.
(machine_function::call_ms2sysv_pad_out): Remove field.
* config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
(ix86_compute_frame_layout): Likewise.
(sp_valid_at): Likewise.
(fp_valid_at): Likewise.
(choose_baseaddr): Modify comments.
(ix86_emit_outlined_ms2sysv_save): Modify.
(ix86_expand_prologue): Likewise.
(ix86_expand_epilogue): Modify comments.
2017-07-23 Daniel Santos <daniel.san...@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.