We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.


Microsoft Specific

Emits the IPF Set User Mask (sum) instruction.

void __sum( 
   int Mask 

[in] Mask

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





Header file <intrin.h>

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.

// 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.
    // write the value in big-endian format
    p[0] = 0x12345678; 

    // Switch back to little-endian memory references.

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