This is the mail archive of the
pthreads-win32@sourceware.org
mailing list for the pthreas-win32 project.
Re: pthreads-win32 2.8.0, stack alignment, and SSE code
regarding my initial problem of making ATLAS work with pthread-win32, a
solution was found with solves all ATLAS alignment problems without
having to patch pthreads: it is to add the option
-mpreferred-stack-boundary=2
to the gcc ATLAS flags ( see
http://sourceforge.net/tracker/index.php?func=detail&aid=2170667&group_id=23725&atid=379483
). This should work with any client lib of pthreads. More generally it
makes gcc more compliant with a platform such as win32 whose ABI only
guarantees 4-byte stack alignment.
I still think aligning the stack of newly created threads on a 16-byte
boundary would be a useful option for pthread-win32.
Ross Johnson a écrit :
I've just read this whole thread for the first time. I haven't come
across this issue of alignment on Intel processors before so I thought
I'd better at least Google around the subject before replying.
Unfortunately I've got to run now and won't be reading mail for
another 5 days or so.
I would very likely include the patch as a build option, so I'm
wondering if you've tried building the library with the -mstackrealign
gcc flag that does the same thing as force_align_arg_pointer (I
haven't tried either of these but read about it).
Ross
Ramiro Polla wrote:
Sébastien Kunz-Jacques wrote:
If for some reason it is not desirable to patch the lib, would it be
possible to have some easy to see disclaimer added about this
problem somewhere?
Oh, that's not my call =). It's up to Ross Johnson to decide. I
simply had lots of free time today and decided to share my ideas. You
can disregard anything I said... (although I think they might help).
The patch is not necessary because 4-byte alignment is enough for x86
and Win32, but it certainly might help some people to avoid a
headache like you mentioned.
Ramiro Polla
- References:
- pthreads-win32 2.8.0, stack alignment, and SSE code
- From: Sébastien Kunz-Jacques
- Re: pthreads-win32 2.8.0, stack alignment, and SSE code
- Re: pthreads-win32 2.8.0, stack alignment, and SSE code
- From: Sébastien Kunz-Jacques
- Re: Re: pthreads-win32 2.8.0, stack alignment, and SSE code
- Re: pthreads-win32 2.8.0, stack alignment, and SSE code
- From: Sébastien Kunz-Jacques
- Re: Re: pthreads-win32 2.8.0, stack alignment, and SSE code
- Re: pthreads-win32 2.8.0, stack alignment, and SSE code
- From: Sébastien Kunz-Jacques
- Re: Re: pthreads-win32 2.8.0, stack alignment, and SSE code
- Re: pthreads-win32 2.8.0, stack alignment, and SSE code