From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17098 invoked by alias); 23 Oct 2008 05:57:14 -0000 Received: (qmail 17090 invoked by uid 22791); 23 Oct 2008 05:57:13 -0000 X-Spam-Check-By: sourceware.org Received: from smtp2-g19.free.fr (HELO smtp2-g19.free.fr) (212.27.42.28) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 23 Oct 2008 05:56:34 +0000 Received: from smtp2-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp2-g19.free.fr (Postfix) with ESMTP id 4D01412B6F2 for ; Thu, 23 Oct 2008 07:56:31 +0200 (CEST) Received: from [192.168.0.2] (gre92-6-82-231-206-104.fbx.proxad.net [82.231.206.104]) by smtp2-g19.free.fr (Postfix) with ESMTP id 215EA12B6E4 for ; Thu, 23 Oct 2008 07:56:31 +0200 (CEST) Message-ID: <4900120C.1090005@yahoo.fr> Date: Thu, 23 Oct 2008 05:57:00 -0000 From: =?ISO-8859-1?Q?S=E9bastien_Kunz-Jacques?= User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 CC: pthreads-win32@sourceware.org Subject: Re: pthreads-win32 2.8.0, stack alignment, and SSE code References: <48E8B399.502@yahoo.fr> <48E8C3B8.2080709@lisha.ufsc.br> <48E8D34F.4@yahoo.fr> <48E906BD.5090304@lisha.ufsc.br> <48E90CB1.2040000@yahoo.fr> <48E91469.3060508@lisha.ufsc.br> <48E91F80.5080809@yahoo.fr> <48E9429E.8020601@lisha.ufsc.br> <48EE0394.8040704@homemail.com.au> In-Reply-To: <48EE0394.8040704@homemail.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org X-SW-Source: 2008/txt/msg00064.txt.bz2 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 > > >