Re: MMX emulator ?

Sylvain Pion (Sylvain.Pion@sophia.inria.fr)
Sun, 28 Jun 1998 22:17:18 +0200


On Sun, Jun 28, 1998 at 06:51:00PM +0200, Andrea Arcangeli wrote:
> >I wondered whether there has been some thoughts about implementing an MMX
> >emulator in the kernel, something like the FPU emulator. It sounds like a
>
> Intel say that it' s impossible. From 24319201.pdf section 10.1:
>
> 10.1. EMULATION OF THE MMX™ INSTRUCTION SET
>
> The Intel Architecture does not support emulation of the MMX
> technology, as it does for floating-point instructions. The EM
> flag in control register CR0 (provided to invoke emulation of
> floating-point instructions) cannot be used for MMX instruction
> emulation. If an MMX instruction is executed when the EM flag is
> set, an invalid opcode (UD#) exception is generated.
>
> Andrea[s] Arcangeli

Well, I already have a prototype (very very very alpha/dirty) that begins to
work. Cf http://www.inria.fr/prisme/personnel/pion/progs/linux if you're
interested. The emulation is actually done via the invalid opcode exception,
caught by the kernel, which in turn sends SIGILL to the process. What Intel
says is that they do not support hardware help for the emulation (and I don't
know what's the benefit of that anyway), but we don't need it.

-- 
Sylvain

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu