Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

__lfetch, __lfetch_excl, __lfetchfault, __lfetchfault_excl

Microsoft Specific

Generate various forms of the Line Prefetch (lfetch) instruction, which is used to tell the processor that an address is to be used frequently.

void __lfetch(
   unsigned int Hint,
   const void * Address
);
void __lfetch_excl(
   unsigned int Hint,
   const void * Address
);
void __lfetchfault(
   unsigned int Hint,
   const void * Address
);
void __lfetchfault_excl(
   unsigned int Hint,
   const void * Address
);

[in] Hint

A hint to the processor about the cache level to use.

[in] Address

The address to reposition in the cache.

Intrinsic

Architecture

__lfetch

IPF

__lfetch_excl

IPF

__lfetchfault

IPF

__lfetchfault_excl

IPF

Header file <intrin.h>

The valid Hint values are constants from 0 through 3, which specify the locality hint. A Hint value of 0 indicates temporal locality (level 1), a 1 indicates no temporal locality (level 1), 2 indicates no temporal locality (level 2), and 3 represents no temporal locality (all levels). Any other value produces a compile time error. For more information, see the Intel IPF documentation.

The following table shows the instructions generated by __lfetch, __lfetch_excl, __lfetchfault, and __lfetchfault_excl with various values of the Hint parameter.

Hint

__lfetch

__lfetch_excl

__lfetchfault

__lfetchfault_excl

0

Lfetch

lfetch.excl

lfetch.fault

lfetch.fault.excl

1

lfetch.nt1

lfetch.excl.nt1

lfetch.fault.nt1

lfetch.fault.excl.nt1

2

lfetch.nt2

lfetch.excl.nt2

lfetch.fault.nt2

lfetch.fault.excl.nt2

3

lfetch.nta

lfetch.excl.nta

lfetch.fault.nta

lfetch.fault.excl.nta

This routine is only available as an intrinsic.

Community Additions

ADD
Show:
© 2015 Microsoft