Partager via


__sum 

Microsoft Specific

Emits the IPF Set User Mask (sum) instruction.

void __sum( 
   int Mask 
);

Parameters

  • [in] Mask
    The 6-bit value to perform an OR operation with the user mask. Must be a compile time constant.

Requirements

Intrinsic Architecture

__sum

IPF

Header file <intrin.h>

Remarks

The Mask parameter is used with an OR operation with the user mask to determine the new user mask value. For a table of the meaning of each of the 6 bits, see __rum.

This routine is only available as an intrinsic.

Example

// usermask.cpp
// processor: IPF

#include <cstdio>
#include <intrin.h>

#pragma intrinsic(__sum, __rum)

#define BIG_ENDIAN 2

int main()
{
    int p[1];
    
    p[0] = 0x12345678;
    printf_s("0x%x\n", p[0]);

    // Switch to big-endian memory references.
    __sum(BIG_ENDIAN); 
    
    // write the value in big-endian format
    p[0] = 0x12345678; 

    // Switch back to little-endian memory references.
    __rum(BIG_ENDIAN); 

    // The same statement in code has produced a different result!
    printf_s("0x%x\n", p[0]);
}

Output

0x12345678
0x78563412

END Microsoft Specific

See Also

Reference

__rum
Compiler Intrinsics