وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

PAVGW

PAVGW 

Usage:  PAVGB   dest,src                        Modifies flags: None

Performs an SIMD average of the packed unsigned integers from the 'src' and the 'dest' , and stores the results in the 'dest' operand. For each corresponding pair of data elements in the first and second operands, the elements are added together, a 1 is added to the temporary sum, and that result is shifted right one bit position.

Average Packed Integers



PAVGB mm1,mm2/m64             ; 0F E0 /r        [KATMAI,MMX]

PAVGW mm1,mm2/m64             ; 0F E3 /r        [KATMAI,MMX,SM]


PAVGB xmm1,xmm2/m128          ; 66 0F E0 /r     [WILLAMETTE,SSE2]

PAVGW xmm1,xmm2/m128          ; 66 0F E3 /r     [WILLAMETTE,SSE2]


PAVGB and PAVGW add the unsigned data elements of the source operand to the unsigned data elements of the destination register, then adds 1 to the temporary results. The results of the add are then each independently right-shifted by one bit position. The high order bits of each element are filled with the carry bits of the corresponding sum.


PAVGB operates on packed unsigned bytes, and


PAVGW operates on packed unsigned words.


The 'src' operand can be an MMX technology register or a 64-bit memory location or it can be an XMM register or a 128-bit memory location. The 'dest' operand can be an MMX technology register or an XMM register.


EXAMPLE:

pavgw xmm1 Label