Access the |X86ISA|::|DPL| field of a interrupt/trap-gate-descriptorbits bit structure.
(interrupt/trap-gate-descriptorbits->dpl x) → dpl
Function:
(defun interrupt/trap-gate-descriptorbits->dpl$inline (x) (declare (xargs :guard (interrupt/trap-gate-descriptorbits-p x))) (mbe :logic (let ((x (interrupt/trap-gate-descriptorbits-fix x))) (part-select x :low 45 :width 2)) :exec (the (unsigned-byte 2) (logand (the (unsigned-byte 2) 3) (the (unsigned-byte 83) (ash (the (unsigned-byte 128) x) -45))))))
Theorem:
(defthm 2bits-p-of-interrupt/trap-gate-descriptorbits->dpl (b* ((dpl (interrupt/trap-gate-descriptorbits->dpl$inline x))) (2bits-p dpl)) :rule-classes :rewrite)
Theorem:
(defthm interrupt/trap-gate-descriptorbits->dpl$inline-of-interrupt/trap-gate-descriptorbits-fix-x (equal (interrupt/trap-gate-descriptorbits->dpl$inline (interrupt/trap-gate-descriptorbits-fix x)) (interrupt/trap-gate-descriptorbits->dpl$inline x)))
Theorem:
(defthm interrupt/trap-gate-descriptorbits->dpl$inline-interrupt/trap-gate-descriptorbits-equiv-congruence-on-x (implies (interrupt/trap-gate-descriptorbits-equiv x x-equiv) (equal (interrupt/trap-gate-descriptorbits->dpl$inline x) (interrupt/trap-gate-descriptorbits->dpl$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm interrupt/trap-gate-descriptorbits->dpl-of-interrupt/trap-gate-descriptorbits (equal (interrupt/trap-gate-descriptorbits->dpl (interrupt/trap-gate-descriptorbits offset15-0 selector ist res1 type s dpl p offset31-16 offset63-32 res2 all-zeros? res3)) (2bits-fix dpl)))
Theorem:
(defthm interrupt/trap-gate-descriptorbits->dpl-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x interrupt/trap-gate-descriptorbits-equiv-under-mask) (interrupt/trap-gate-descriptorbits-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 105553116266496) 0)) (equal (interrupt/trap-gate-descriptorbits->dpl x) (interrupt/trap-gate-descriptorbits->dpl y))))