9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] broken floating point exceptions and fpregs
Date: Sat, 25 May 2013 09:47:05 -0400	[thread overview]
Message-ID: <87ca50213f6c6d2bae4e45e0327c9fef@kw.quanstro.net> (raw)
In-Reply-To: <643973b9c0074170145322ddf82ea07c@gmx.de>

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



  parent reply	other threads:[~2013-05-25 13:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-24 21:29 cinap_lenrek
2013-05-25  2:10 ` cinap_lenrek
2013-05-25 13:47 ` erik quanstrom [this message]
2013-05-25 13:58   ` Kurt H Maier
2013-05-25 15:02     ` erik quanstrom
2013-05-25 15:40       ` Kurt H Maier
2013-05-25 15:59         ` erik quanstrom
2013-05-25 19:21       ` Francisco J Ballesteros
2013-05-26  6:00         ` lucio
2013-05-26  8:40           ` Francisco J Ballesteros
2013-05-26  5:57       ` lucio
2013-05-27  3:51         ` Anthony Sorace
2013-05-27  5:35           ` lucio
2013-05-25 14:54   ` cinap_lenrek
2013-05-25 15:00     ` erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ca50213f6c6d2bae4e45e0327c9fef@kw.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).