Clear Global Interrupt Flag

Encoding

EncodingOperand
zoNone

Description

The CLGI instruction clears the GIF (global interrupt flag). While the GIF is cleared, external interupts are disabled.

This instruction is a Secure Virtual Machine (SVM) instruction. If SVM is disabled, execution of this instruction will raise a #UD exception.

Operation

public void CLGI()
{
    if (!SVM.Enabled)
        #UD;
    GIF = 0;
}

Flags Affected

None.

Exceptions

Real-Address Mode

#UD
  • If in Real Mode.

Virtual-8086 Mode

#UD
  • If in Virtual-8086 Mode.

Protected Mode

#UD
  • If EFER.SVME is 0 (SVM disabled)
#GP(0)
  • If CPL is greater than 0.

Compatibility Mode

#UD
  • If EFER.SVME is 0 (SVM disabled)
#GP(0)
  • If CPL is greater than 0.

Long Mode

#UD
  • If EFER.SVME is 0 (SVM disabled)
#GP(0)
  • If CPL is greater than 0.