Opcode | Encoding | 16-bit | 32-bit | 64-bit | CPUID Feature Flag(s) | Description |
---|---|---|---|---|---|---|
NFx 66 0F AE mem/7 CLFLUSHOPT m8 | m | Valid | Valid | Valid | clflushopt | Flush the cache line containing m8. |
Encoding
Encoding | Operand |
---|---|
m | ModRM.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
void _mm_clflushopt(const void *ptr)
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.