All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Boyer <flar@allandria.com>
To: Thorsten Otto <admin@tho-otto.de>
Cc: linux-m68k@vger.kernel.org
Subject: Re: Software FPU emulation in linux kernel
Date: Mon, 3 Mar 2025 21:48:35 -0800	[thread overview]
Message-ID: <20250304054835.GA13449@allandria.com> (raw)
In-Reply-To: <49758471.MN2xkq1pzW@earendil>

On Tue, Mar 04, 2025 at 06:24:30AM +0100, Thorsten Otto wrote:
> On Montag, 3. M?rz 2025 23:10:12 CET Brad Boyer wrote:
> > Well, most programs that use FPU instructions aren't going to use anything
> > beyond the basics.
> 
> Thats true. But if they do, wouldn't it be better to just abort the
> program so the user will notice it, rather than continuing with
> totally bogus values? Currently, uprint will just use the kernels
> printk. I guess that will just end up in the syslog for most cases,
> and not even seen by the user.

Yes, it should cause an unimplemented instruction trap or something like
that. I was just pointing out that there aren't likely to be a lot of
programs anyone is using on an m68k Linux system that would notice.

> > In practice, no. There's a lot of other issues as well. I seem to
> > recall that it only supports the 020/030 and not the versions of
> > the 040/060 without FPU.
> 
> Thats mostly a matter how it is integrated in the system. That will obviously 
> be totally different in my case.

True, but it is further evidence that it doesn't actually get used.

> > Most existing 68LC040 chips also have the bug that causes missed
> > page faults after software-emulated instructions as well
> 
> Oh, i didn't know that. But handling pagefaults is another thing. But
> freemint does not manage virtual memory, so that should not be a
> problem here.

If you're curious, it's #10 in this list:

https://www.nxp.com/docs/en/errata/MC68040DE_D.txt

A lack of virtual memory should prevent it, as you pointed out.
Interestingly, it's not actually specific to FPU emulation even
though it was normally known for causing issues with FPU. Apple
had a generic workaround in their OS for everything other than
the floating point exceptions (they use a different frame type).

	Brad Boyer
	flar@allandria.com


  reply	other threads:[~2025-03-04  5:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-03 16:22 Software FPU emulation in linux kernel Thorsten Otto
2025-03-03 22:10 ` Brad Boyer
2025-03-04  5:24   ` Thorsten Otto
2025-03-04  5:48     ` Brad Boyer [this message]
2025-03-03 23:38 ` Michael Schmitz
2025-03-04  4:44   ` Finn Thain
2025-03-04  5:47   ` Thorsten Otto
2025-03-06 15:24 ` Thorsten Otto

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=20250304054835.GA13449@allandria.com \
    --to=flar@allandria.com \
    --cc=admin@tho-otto.de \
    --cc=linux-m68k@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.