Thorvald, re: At 03:18 AM 1/6/2006, Thorvald Natvig wrote:>I just checked it in the debugger, and this was with gcc 3.4.4 (mingw)... >And the addresses were not properly aligned :( From a bit of googling, >this seems to be a thread problem, as the gcc just maintains 16-byte >alignment of the stack -- if the start function of the thread had >misaligned stack, the misalignment will be kept throughout the execution.Thanks! This is exactly the issue- that, and the fact that gcc seems to be issuing a movaps call that copies into unaligned memory right after loading the xmm register. No matter how we put the code together it always issues the movaps (probably because it needs more than 8 registers)- I am sure this code would work fine on a machine with 16 xmm registers. For now we will just use the c code for the unaligned _10 call. Probably this could be fixed also by hand coding this particular chunk of assembler. Tom
Jean-Marc Valin
2006-Jan-06 17:24 UTC
[Speex-dev] Re: sigsegv in _mm_load_ups (linux/gcc 3.x)
Tom, Thorvald, Could one of you submit the details to the gcc bugzilla so it gets fixed? BTW, is 4.0 affected? Jean-Marc Le vendredi 06 janvier 2006 ? 17:13 -0800, Tom Harper a ?crit :> Thorvald, > > re: > At 03:18 AM 1/6/2006, Thorvald Natvig wrote: > >I just checked it in the debugger, and this was with gcc 3.4.4 (mingw)... > >And the addresses were not properly aligned :( From a bit of googling, > >this seems to be a thread problem, as the gcc just maintains 16-byte > >alignment of the stack -- if the start function of the thread had > >misaligned stack, the misalignment will be kept throughout the execution. > > Thanks! This is exactly the issue- that, and the fact that gcc seems to be > issuing a movaps call that copies into unaligned memory right after loading > the xmm register. No matter how we put the code together it always issues > the movaps (probably because it needs more than 8 registers)- I am sure this > code would work fine on a machine with 16 xmm registers. For now we will > just use the c code for the unaligned _10 call. Probably this could be fixed > also by hand coding this particular chunk of assembler. > > > Tom > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev >
I am pretty sure there is already a similar bug in there- this probably could be fixed in the threading library instead, so i am not sure whether gcc will address this or not. Tom At 05:24 PM 1/6/2006, Jean-Marc Valin wrote:>Could one of you submit the details to the gcc bugzilla so it gets >fixed? BTW, is 4.0 affected?