[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs-26 threads problem [win64]

From: Eli Zaretskii
Subject: Re: Emacs-26 threads problem [win64]
Date: Sat, 14 Oct 2017 17:00:53 +0300

> From: Andreas Schwab <address@hidden>
> Cc: address@hidden,  address@hidden,  address@hidden
> Date: Sat, 14 Oct 2017 14:39:56 +0200
> On Okt 14 2017, Eli Zaretskii <address@hidden> wrote:
> > But the important question is IMO: why did GCC emit the movaps
> > instruction? why did it assume that struct thread_state must be
> > 16-byte aligned?  What am I missing here?
> The alignment of a struct is always at least the maximum of the
> alignment of all members.  How else would you be able to align the
> members?

Let me see if I understand correctly what you are saying.

You are saying that some member of struct thread_state, probably
m_getcjmp, has a 16-byte alignment, at least in the 64-bit Windows
build.  GCC sees that, and therefore deduces that the entire struct
must be 16-byte aligned, so it feels free to emit movaps in
conjunction with the m_stack_bottom member, which is at offset 64
(decimal) from the struct base, and therefore should also be 16-byte
aligned.  Is that correct?

If so, we indeed should make sure the struct is 16-byte aligned.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]