Re: Pentium emulation

Bernd Schmidt (crux@Pool.Informatik.RWTH-Aachen.DE)
Fri, 25 Jul 1997 13:33:26 +0200 (MET DST)


> Imagine the following situation:
>
> You have several PCs from 386 to Pentium (or Pentium II or whatever).
> You also have programs that should run on any of your PCs. This means
> you have to compile with the -m386 or -m486 option rather than
> optimizing for Pentium.

No.

> Or you have a cool binary that has been compiled for Pentium but
> you want to try it on a 486...
>
> Couldn't the kernel provide emulation of the Pentium instructions
> for the 386/486, to solve this problem? I guess it could be done
> since it would be very similar to the FPU emulator.
>
> So the question is mainly: Would it make sense?

No. There are no new Pentium opcodes other than things like RDTSC or
RDMSR, which aren't really useful for normal user programs and are
never generated by the compiler.
Things are different with PPro/Pentium II which have a new conditional
move instruction. The currently available GCC versions don't generate
these either, but 2.8.0 will most likely support them. It might make
sense to try to provide an emulation for those, but it would not be
very useful because of the performance loss. I don't think there will
be any precompiled binaries with those opcodes anytime soon.

Bernd