public inbox for
 help / color / mirror / Atom feed
From: "Sébastien Kunz-Jacques" <>
Subject: Re: pthreads-win32 2.8.0, stack alignment, and SSE code
Date: Thu, 23 Oct 2008 05:57:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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 


to the gcc ATLAS flags ( see 
). 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

      parent reply	other threads:[~2008-10-23  5:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-05 12:32 Sébastien Kunz-Jacques
2008-10-05 13:41 ` Ramiro Polla
2008-10-05 14:47   ` Sébastien Kunz-Jacques
2008-10-05 18:27     ` Ramiro Polla
2008-10-05 18:52       ` Sébastien Kunz-Jacques
2008-10-05 19:25         ` Ramiro Polla
2008-10-05 20:12           ` Sébastien Kunz-Jacques
2008-10-05 22:42             ` Ramiro Polla
2008-10-09 13:14               ` Ross Johnson
2008-10-09 19:51                 ` Sébastien Kunz-Jacques
2008-10-23  5:57                 ` Sébastien Kunz-Jacques [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).