the sse change broke floating point exception handling.

from /sys/src/9/pc/main.c:^matherror()
        /*
         *  save floating point state to check out error
         */
        fpenv(&up->fpsave);
        mathnote();

this is wrong, because fpenv() will store the enviroment
in x87 format, but mathnote() uses mathstate() which intreprets
the FPsave structure depending on if sse was enabled or not.

a fix for this was just commited in 9front which passes the
status word and fppc explicitely to mathnode() and uses
mathnote(up->fpsave.status, up->fpsave.pc); in matherror()
and the values extracted by mathstate() in mathemu().

the 2nd problem is how we'r going to handle the fpregs file
in devproc. as this change changes the format. fpr() in acid
returns garbage right now. any thoughts on it how to move
forward on this?

--
cinap

Reply via email to