mwaitx

Monitor Wait Extended

MWAITX

Waits for a write to monitored address (AMD extension).

Pseudocode Operation

while (memory[monitor_address] has not been written) {
  if (ECX[1] == 1 && timeout_expired(EDX)) break
  if (interrupt_pending()) break
  wait()
}

Encoding

Binary Layout
0F
+0
01
+1
FB
+2
 
Format AMD
Opcode 0F 01 FB
Extension AMD

Operands

Related

More in AMD

Instruction Forms

Opcode Instruction Op/En 64/32-bit Mode CPUID Description
0F 01 FB MWAITX Causes the processor to stop instruction execution until a store to the monitored address range occurs, an interrupt is received, or (if enabled via ECX bit 1) a timeout in EBX expires.

Description

Waits for a store to the address range armed by MONITORX, or until the optional EBX timeout elapses. AMD-specific counterpart to MWAIT (Intel MWAIT uses SSE3's 0F 01 C9; MWAITX is a distinct AMD encoding, 0F 01 FB, with the added timeout capability).