Subject: Re: Emulation pointer wanted
To: Todd Whitesel , der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Ignatios Souvatzis <>
List: tech-kern
Date: 09/15/1999 09:59:36
On Wed, Sep 15, 1999 at 12:54:52AM -0700, Todd Whitesel wrote:
> > I was pondering some of the "build lab" problems, and it occurred to me
> > that while cross-compiling is nice, it would be nicer to run native
> > compilers for the slow ports (such as sun3 and vax).  But of course
> > you'd really like to run them on fast hardware.
> I'm really interested in this for a variety of reasons:
>     1. You can prototype new CPU instruction sets and toolchains on real-
> 	world application code, just by tweaking the toolchain and emulator.
> 	(Were I a semiconductor vendor, I would pay REAL money to have this.)
>     2. If it can be made compatible with the foreign O/S emulations, it
> 	opens up the possibility of Linux or FreeBSD emulation on all arches
> 	(nothing wrong with emulating FreeBSD/i386 on VAX, if it means a
> 	reliable netscape!!).
>     3. It lets multi-arch networks of machines all run the same binaries
> 	and userland environment (via chroot and NFS magic) for parallel
> 	processing purposes. (Like building pkgsrc with -j99 ...)
>     4. Sick as it sounds, this has one advantage over real cross-builds in
> 	that it perfectly emulates the installation of binaries on top of
> 	a running system. Of course it is debatable whether this can really
> 	be called an advantage.
> Once the emulators get sophisticated enough to do dynamic recompilation,
> this technology becomes much more interesting. I've worked on interpretive
> emulators in past jobs and mused about this sort of thing for quite some
> time.
> > I was thinking of doing this as an emulation package in the kernel,
> Yeah. Note that on at least m68k/i386 there is floating point emulation
> code in the kernel, and on i386 it could really use some work.
> I will get back on that, ahem ahem

on m68k, it does not work for the 680LC40 and 680LC60. And it assumes you have
the 68020 / 68030 cpu, to begin with.

That is, you would need to emulate the trap, thus runnning the FP emulation
code inside the emulated machine (not the real machine).

Besides: last I checked, it was incomplete. (Just enough to run system

 * Progress (n.): The process through which Usenet has evolved from
   smart people in front of dumb terminals to dumb people in front of
   smart terminals.  -- (obscurity)