Alan Coopersmith wrote:
>
> So given your last update to the bugzilla report at
>    http://defect.opensolaris.org/bz/show_bug.cgi?id=9862#c11
> is this a compiler bug we should be filing with the Studio team
> or is using fp in a signal handler that may interrupt MMX/SSE code
> an unsafe operation that gcc just lets us get away with?
>   
It's not using fp, it is mixing x87 fp with mmx instructions which
alter the x87 fp state.  In this case (OSOL bug 9862), the mixing happens
to be caused by signal delivery but this could also be induced by mixing
it in regular code.

> Would the fix be to insert an asm("emms") into the signal handler
> or does that just move the breakage from the mouse movement to
> breaking the interrupted MMX operations?
>
>   
It doesn't move the breakage.  Signal delivery is preceded by saving FPU 
state
and this state is restored on the way out of the handler before 
returning to the
interrupted code.


Reply via email to