Access the |X86ISA|::|DPL| field of a system-segment-descriptorbits bit structure.
(system-segment-descriptorbits->dpl x) → dpl
Function:
(defun system-segment-descriptorbits->dpl$inline (x) (declare (xargs :guard (system-segment-descriptorbits-p x))) (mbe :logic (let ((x (system-segment-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-system-segment-descriptorbits->dpl (b* ((dpl (system-segment-descriptorbits->dpl$inline x))) (2bits-p dpl)) :rule-classes :rewrite)
Theorem:
(defthm system-segment-descriptorbits->dpl$inline-of-system-segment-descriptorbits-fix-x (equal (system-segment-descriptorbits->dpl$inline (system-segment-descriptorbits-fix x)) (system-segment-descriptorbits->dpl$inline x)))
Theorem:
(defthm system-segment-descriptorbits->dpl$inline-system-segment-descriptorbits-equiv-congruence-on-x (implies (system-segment-descriptorbits-equiv x x-equiv) (equal (system-segment-descriptorbits->dpl$inline x) (system-segment-descriptorbits->dpl$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm system-segment-descriptorbits->dpl-of-system-segment-descriptorbits (equal (system-segment-descriptorbits->dpl (system-segment-descriptorbits limit15-0 base15-0 base23-16 type s dpl p limit19-16 avl res1 g base31-24 base63-32 res2 all-zeroes? res3)) (2bits-fix dpl)))
Theorem:
(defthm system-segment-descriptorbits->dpl-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x system-segment-descriptorbits-equiv-under-mask) (system-segment-descriptorbits-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 105553116266496) 0)) (equal (system-segment-descriptorbits->dpl x) (system-segment-descriptorbits->dpl y))))