On 05/02/2017 05:21 AM, JonY wrote:
On 05/01/2017 11:31 AM, Uros Bizjak wrote:
I also assume that Cygwin and MinGW people agree with the patch and
the functionality itself.
Uros.
Cygwin and MinGW does not use SysV/MS transitions directly in their own
code, changes should be OK.
And to be clear, this did initially have a failed gcc test on Cygwin due
to the aligned SSE MOVs portion of the patch set (this is the first
three patches) and this is resolved by disabling that feature on SEH
targets. This is the last two lines in the below chunk from 3/12:
@@ -14080,11 +14102,19 @@ ix86_expand_prologue (void)
GEN_INT (-align_bytes)));
/* For the purposes of register save area addressing, the stack
- pointer is no longer valid. As for the value of sp_offset,
- see ix86_compute_frame_layout, which we need to match in order
- to pass verification of stack_pointer_offset at the end. */
+ pointer can no longer be used to access anything in the frame
+ below m->fs.sp_realigned_offset and the frame pointer cannot be
+ used for anything at or above. */
m->fs.sp_offset = ROUND_UP (m->fs.sp_offset, align_bytes);
- m->fs.sp_valid = false;
+ m->fs.sp_realigned = true;
+ m->fs.sp_realigned_offset = m->fs.sp_offset - frame.nsseregs * 16;
+ gcc_assert (m->fs.sp_realigned_offset == frame.stack_realign_offset);
+ /* SEH unwind emit doesn't currently support REG_CFA_EXPRESSION, which
+ is needed to describe where a register is saved using a realigned
+ stack pointer, so we need to invalidate the stack pointer for that
+ target. */
+ if (TARGET_SEH)
+ m->fs.sp_valid = false;
}
allocate = frame.stack_pointer_offset - m->fs.sp_offset;
Still I have run complete tests on Cygwin with 32- and 64-bit using both
the Cygwin and MinGW compilers.
Daniel