From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sat, 25 May 2013 09:47:05 -0400 To: 9fans@9fans.net Message-ID: <87ca50213f6c6d2bae4e45e0327c9fef@kw.quanstro.net> In-Reply-To: <643973b9c0074170145322ddf82ea07c@gmx.de> References: <643973b9c0074170145322ddf82ea07c@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] broken floating point exceptions and fpregs Topicbox-Message-UUID: 5bd83556-ead8-11e9-9d60-3106f5b1d025 On Fri May 24 17:30:59 EDT 2013, cinap_lenrek@gmx.de wrote: > 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(). http://ftp.9atom.org/9pccpuf-sse this is a different implementation that steve simon used to run linuxemu. > 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? why don't we just let the 386 kernel rest in peace and use 64-bit for sse? - erik