iretq

Interrupt return, 64-bit

Returns from an interrupt by popping rip, cs, rflags, rsp and ss, the 64-bit form.

x86-64 and later

Intel's reference: IRET/IRETD/IRETQ

CFPFAFZFSFTFIFDFOF ●●●●●●●●●
  • ● set from the result
  • CF Loaded from the stack.
  • PF Loaded from the stack.
  • AF Loaded from the stack.
  • ZF Loaded from the stack.
  • SF Loaded from the stack.
  • TF Loaded from the stack.
  • IF Loaded from the stack only with the privilege to change it, which a Linux program lacks.
  • DF Loaded from the stack.
  • OF Loaded from the stack.

Forms

  • iretq

Only the flags the privilege level allows are restored. A Linux program has no interrupt handlers of its own to return from.