This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Misalignment of local SSE variables in thread function


Brian Dessent wrote:
> 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.

That's not quite right, if you look at one of my previous emails in this
thread you'll see that gcc aligns the stack at the start of the main()
function, not MinGW.

Jon



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]