need help with mmx (vc++)

From: Soulblazer (soulblazer28_at_yahoo.com)
Date: 07/31/04


Date: 31 Jul 2004 11:03:39 -0700

I have a loop that I think can benefit from MMX instructions, but not
sure how to do it. I read through the manuals but nothing registers
(no pun intended).

Basically I loop through a graphics buffer (16 bit) with a right shift
and an AND operation. I've basically been loading in 32 bits and
doing two RGB's at a time, but I'm sure MMX must have a faster way.
Here is an example psuedo:

for ()
{
    int data;
    ...
    data = (data >> 1) & 0xF7F7F7F7; // 1 and 0xF7F7F7F7 are
constants
    ...
}

Can someone help translate this to an inline (MSVC) MMX version?
I would be most appreciative!



Relevant Pages

  • accelerating probesetvalues.m by removing the loop for inner = 1:NumPairs
    ... The function probesetvalues.m runs a loop ... for inner = 1:NumPairs ... PMX = thePairs; ... MMX = thePairs; ...
    (comp.soft-sys.matlab)
  • Re: MMX Copy
    ... Your loop. ... cache, you are simply copying from one area of the cache ... MMX has less performance compared with memcpy function when I am ... copying small data of size less than 1MB. ...
    (microsoft.public.win32.programmer.networks)
  • Re: need help with mmx (vc++)
    ... > Basically I loop through a graphics buffer with a right shift ... > doing two RGB's at a time, but I'm sure MMX must have a faster way. ... > Can someone help translate this to an inline MMX version? ... There is no 'MMX' in C++ language. ...
    (comp.lang.cpp)
  • Re: Combining two MMX registers into one SSE register?
    ... I already had resigned to the fact not to use MMX under ... Can x87 instructions still be used by 64-bit applications? ... About x87 and mmx registers ... Can floating point registers be used in 64-bit Windows? ...
    (comp.lang.asm.x86)
  • Re: the performance of x86 processor and DSP
    ... between FPU and MMX modes? ... the code to save MMX registers at task switch. ... It really looks like Intel cooked up their instruction set additions by ...
    (comp.dsp)