Access the |X86ISA|::|IOPL| field of a rflagsbits bit structure.
(rflagsbits->iopl x) → iopl
Function:
(defun rflagsbits->iopl$inline (x) (declare (xargs :guard (rflagsbits-p x))) (mbe :logic (let ((x (rflagsbits-fix x))) (part-select x :low 12 :width 2)) :exec (the (unsigned-byte 2) (logand (the (unsigned-byte 2) 3) (the (unsigned-byte 20) (ash (the (unsigned-byte 32) x) -12))))))
Theorem:
(defthm 2bits-p-of-rflagsbits->iopl (b* ((iopl (rflagsbits->iopl$inline x))) (2bits-p iopl)) :rule-classes :rewrite)
Theorem:
(defthm rflagsbits->iopl$inline-of-rflagsbits-fix-x (equal (rflagsbits->iopl$inline (rflagsbits-fix x)) (rflagsbits->iopl$inline x)))
Theorem:
(defthm rflagsbits->iopl$inline-rflagsbits-equiv-congruence-on-x (implies (rflagsbits-equiv x x-equiv) (equal (rflagsbits->iopl$inline x) (rflagsbits->iopl$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm rflagsbits->iopl-of-rflagsbits (equal (rflagsbits->iopl (rflagsbits cf res1 pf res2 af res3 zf sf tf intf df of iopl nt res4 rf vm ac vif vip id res5)) (2bits-fix iopl)))
Theorem:
(defthm rflagsbits->iopl-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x rflagsbits-equiv-under-mask) (rflagsbits-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 12288) 0)) (equal (rflagsbits->iopl x) (rflagsbits->iopl y))))