Flush Cache Line (Optimized)

Encoding

EncodingOperand
mModRM.r/m[w]

Description

The CLFLUSHOPT instruction invalidates every level of the cache hierarchy containing the operand's effective address. This will force any "dirty" memory in the caches to be written back to main memory.

Executions of this instruction are ordered with respect writes, locked RMW (read‑modify‑write), and "fence" instructions. However, they are not ordered with respect to executions of CLFLUSH (Flush Cache Line), other CLFUSHOPT instructions, and CLWB (Write Back Cache Line).

In some architectures, this instruction may cause a transactional abort with the Transactional Synchronization Extensions (TSX). However, programmers must not rely on this behavior.

Operation

public void CLFLUSHOPT(IntPtr addr)
{
    CacheLineFlush(addr, optimized: true);
}

Intrinsics

Exceptions

Real-Address Mode

#UD
  • If the
  • LOCK
  • prefix is used.

Virtual-8086 Mode

#UD
  • If the
  • LOCK
  • prefix is used.

Protected Mode

#UD
  • If the
  • LOCK
  • prefix is used.

Compatibility Mode

#UD
  • If the
  • LOCK
  • prefix is used.

Long Mode

#UD
  • If the
  • LOCK
  • prefix is used.