lkml.org 
[lkml]   [1998]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: MMX emulator ?
    On Tue, 16 Jun 1998, Jeffrey Hundstad wrote:

    > On 16 Jun, linker@nightshade.ml.org wrote:
    > > Wouldn't it be better for all if apps:
    > >
    > > i = detect_MMMX();
    > > if !i then usenormalstuff=1;
    > > else usemmx=1;
    > >
    > > then had code for both cases???
    >
    > no....
    >
    > If you can assume the MMX functions are there then EACH application
    > doesn't have to emulate all of the MMX stuff itself if it doesn't have
    > the REAL hardware.
    >
    > This should be treated EXACTLY like the Floating Point hardware... at
    > least in my opinion.

    Hmm.. The whole reason for using MMX is so that you can get a great speed
    improvement on a VERY limited class of functions. Usually you end up hand
    coding the new MMX function.

    Using MMX emu will completely kill performance, it makes the mmx opts
    absolutly pointless.

    The FPU is useful to an incredbily wide range of formulas.. Infact, if you
    dont have FPU or a FPU emulator there are quite a few things you can not
    do (without basicly emulating the FPU in software in the app itself).

    Everything that MMX can do can be done with standard int code, just
    slower.

    I would dare to say that you almost always have a clean C implimentation
    of your stuff that you want to MMXify before you actually MMXify it.

    Furthermore, the idea of a FPU exists on all platforms Linux runs on
    (no?).

    MMX is a cpu specific optimazation.. You suggestion would is like:

    We need to include a x86 opcode emulator in the kernel, so that Alphas can
    execute apps where there programmer wrote the program in C but a few
    functions in x86 asm and didn't provide C versions. Or vice versa (alpha
    code on x86).

    That case would hopefully never occure.. A MMX only app wouldn't run on
    PPC/Alpha/Mips/68k/Stronarm/non-mmx pentium.

    If the programmer wants portability he will have to provide a C version
    along with the optimized version(s). It's not hard.


    > -jeffrey hundsatd

    Gregory Maxwell


    -
    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:4.171 / U:1.428 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site