lkml.org 
[lkml]   [1998]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: MMX emulator ?
    Date
    From
    Sylvain Pion <Sylvain.Pion@sophia.inria.fr> said:
    > 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.

    > 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.

    Just add up the cost of the exception handling, plus the SIGILL handling,
    plus the context switches involved... and consider if that cost *for each
    instruction* is worth it to "speed up" the bit fiddling.
    --
    Horst von Brand vonbrand@sleipnir.valparaiso.cl
    Casilla 9G, Viña del Mar, Chile +56 32 672616

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

    \
     
     \ /
      Last update: 2005-03-22 13:43    [W:3.017 / U:0.160 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site