Returns the current mode of operation of the x86 machine
(x86-operation-mode x86) → mode
We only support 64-bit, Compatibility, and 32-bit Protected Modes for now.
See x86-modes.
Function:
(defun x86-operation-mode (x86) (declare (xargs :stobjs (x86))) (declare (xargs :guard t)) (let ((__function__ 'x86-operation-mode)) (declare (ignorable __function__)) (cond ((64-bit-modep x86) 0) (t 1))))
Theorem:
(defthm natp-of-x86-operation-mode (b* ((mode (x86-operation-mode x86))) (natp mode)) :rule-classes (:type-prescription :rewrite))
Theorem:
(defthm range-of-x86-operation-mode (b* ((?mode (x86-operation-mode x86))) (and (<= 0 mode) (< mode 5))) :rule-classes :linear)
Theorem:
(defthm x86-operation-mode-of-xw (implies (and (not (equal fld :msr)) (not (equal fld :seg-hidden-attr))) (equal (x86-operation-mode (xw fld index value x86)) (x86-operation-mode x86))))
Theorem:
(defthm x86-operation-mode-of-write-user-rflags (equal (x86-operation-mode (write-user-rflags vector mask x86)) (x86-operation-mode x86)))