This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Misalignment of local SSE variables in thread function
- From: Brian Dessent <brian at dessent dot net>
- To: tprince at nospamcomputer dot org
- Cc: jon_kinsey at hotmail dot com, gcc-help at gcc dot gnu dot org
- Date: Thu, 18 Jan 2007 09:22:05 -0800
- Subject: Re: Misalignment of local SSE variables in thread function
- References: <1169139687.c7ceafdctprince@myrealbox.com>
- Reply-to: gcc-help at gcc dot gnu dot org
Timothy C Prince wrote:
> I suppose it helps a little, because broken binutils I have seen had older versions than that. Somewhere along the line, if you said what environment you were using, I missed it. It looks like others have figured out you were using mingw32, with which I have relatively little experience. I haven't looked to see whether mingw binutils is generally built with only 4-byte alignment support, as cygwin used to be. Not only did that break SSE, it made doubles slow.
I don't think binutils is of any relevance in this case because the
problem revolves around the alignment of the stack created by a call to
CreateThread at runtime, and has nothing to do with the alignment of
text/data/bss sections set by the linker in the binary. The only reason
it isn't a problem in the main thread is because the MinGW startup takes
care of setting the alignment before calling main.
Brian