9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@swtch.com>
To: 9fans@9fans.net
Subject: Re: [9fans] signal.h in APE for newbies
Date: Fri,  4 Jul 2008 15:22:13 -0400	[thread overview]
Message-ID: <20080704192009.3F69C1E8C7F@holo.morphisms.net> (raw)
In-Reply-To: <74e6c91c9b771978f68b4f7430ae3cc2@terzarima.net>

> vx32 converts SIGFPE to the SIMD SSE/SSE2 trap 19, but
> 9vx expects only x87.

Ah.  So that explains where the 19 came from.
I had wondered how I got that wrong.  ;-)
Vx32 originally disallowed the x87 so that the
VM execution would be more deterministic,
but it was easier to turn on x87 support than
change 8c.

> i had wondered the other day whether there were AMD/Intel processors
> in common use that supported x87 but not SSE/SSE2.  should 8c start
> using SSE as the plan 9 amd64 compiler does? could it support that exclusively?

I have pushed hard to keep post-386 dependencies
from creeping into the system.  That's why, for example,
libthread uses locked INCL and DECL instructions
instead of the commented-out XADDL implementation
that would only work on the 486 and later.
I harbor no illusion that we've succeeded entirely, but
I do hope that if someone dug up a 386, it would not be
too much work to get it to boot and run.

Just the other day Sape and I were discussing whether
some code he was working on should add a dependency
on CMPXCHG8B (64-bit compare and swap), which was
only introduced in the Pentium.  I think we decided there
is a way to avoid it in favor of the 386-supported 32-bit XCHG.

The SSE instructions were only added in the Pentium III;
SSE2 only came in with the Pentium 4.

I realize that, at this point, keeping 386 support is bordering
on retrocomputing, but it's hard to know where to draw the line.
I would be inclined to leave the 386 support as it is
and assume that people who want to take advantage of
new features will switch to the x86-64 once the port is available.
But I might just be out of touch.

Russ



      parent reply	other threads:[~2008-07-04 19:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-04  8:17 Fernan Bolando
2008-07-04  9:59 ` Charles Forsyth
     [not found] ` <a85d07977219d1010dd930280d4b013e@terzarima.net>
2008-07-04 14:17   ` Fernan Bolando
2008-07-04 15:54     ` Russ Cox
2008-07-04 17:19     ` Charles Forsyth
2008-07-04 17:21       ` erik quanstrom
2008-07-04 18:04         ` Charles Forsyth
2008-07-04 18:14           ` erik quanstrom
2008-07-04 19:22       ` Russ Cox [this message]

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=20080704192009.3F69C1E8C7F@holo.morphisms.net \
    --to=rsc@swtch.com \
    --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).