Share via


__movca (Windows Embedded CE 6.0)

1/5/2010

Move with cache block allocation.

Syntax

void __movca( 
  unsigned long value, 
  unsigned long* addr 
);

Parameters

  • value
    [in] Specifies longword to store in memory.
  • addr
    [in] Address in memory to be accessed.

Return Values

None.

Remarks

The following code example shows how to use _prefetch with _moveca.

#include <stdio.h>
#include <shintr.h>
#include <cmnintrin.h>

#pragma intrinsic(__prefetch, __movca)
void main()
{
     unsigned long addr[1]={0xffff};
     unsigned long value = 0x100;
//
     printf("before prefetch addr value = %x\n", addr[0]);     
//
     __prefetch(addr);
     printf("after prefetch addr value = %x\n", addr[0]);

     if (addr[0] != 0xffff)
          printf("error\n");

     __movca(value, addr);
     printf("after movca addr value = %x\n", addr[0]);

     if (addr[0] != value)
          printf("error\n");
}

This example results in the following output.

before prefetch addr value = ffff
after prefetch addr value = ffff
after movca addr value = 100

Requirements

Architecture SH-4
Header shintr.h
Routine __movca

See Also

Reference

Intrinsic Functions for Renesas Microprocessors
_prefetch