Udostępnij za pośrednictwem


__m64_psub1uus

Microsoft Specific

Emits the 1-byte uus (unsigned, unsigned, signed) saturation form of the IPF Parallel Subtract (psub1.uus) instruction.

__m64 __m64_psub1uus( 
   __m64 a, 
   __m64 b 
);

Parameters

  • [in] a
    An __m64 union containing an array of eight 8-bit unsigned integers.

  • [in] b
    An __m64 union containing an array of eight 8-bit signed integers.

Return Value

An __m64 union containing an array of eight 8-bit unsigned integers, which are the results of the subtraction of the integers in b from the integers in a.

Requirements

Intrinsic

Architecture

__m64_pshradd2

IPF

Header file <intrin.h>

Remarks

The uus-saturation form means that the first parameter is unsigned, the second parameter is signed, and the return value is unsigned, and if an overflow or underflow occurs, the value saturates at the limit value. The 1-byte form operates on each byte as a separate integer.

Example

// psub1uus.cpp
// processor: IPF
#include <stdio.h>
#include <intrin.h>

#pragma intrinsic(__m64_psub1uus)

int main()
{
    __m64 m, n, result;
    m.m64_i64 = 0xee0100;  
    n.m64_i64 = 0x00ff22;  // as the second parameter, 0xff = -1
    result = __m64_psub1uus(m, n);
    printf("__m64_psub1uus(0x%I64x, 0x%I64x) returns 0x%I64x\n",
        m, n, result);

    result = __m64_psub1uus(n, m);
    printf("__m64_psub1uus(0x%I64x, 0x%I64x) returns 0x%I64x\n",
        n, m, result);
}

Output

__m64_psub1uus(0xee0100, 0xff22) returns 0xee0200
__m64_psub1uus(0xff22, 0xee0100) returns 0x12fe22

See Also

Reference

__m64

Compiler Intrinsics