Access the |ACL2|::|P| field of a data-segment-descriptorbits bit structure.
(data-segment-descriptorbits->p x) → p
Function:
(defun data-segment-descriptorbits->p$inline (x) (declare (xargs :guard (data-segment-descriptorbits-p x))) (mbe :logic (let ((x (data-segment-descriptorbits-fix x))) (part-select x :low 47 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 17) (ash (the (unsigned-byte 64) x) -47))))))
Theorem:
(defthm bitp-of-data-segment-descriptorbits->p (b* ((p (data-segment-descriptorbits->p$inline x))) (bitp p)) :rule-classes :rewrite)
Theorem:
(defthm data-segment-descriptorbits->p$inline-of-data-segment-descriptorbits-fix-x (equal (data-segment-descriptorbits->p$inline (data-segment-descriptorbits-fix x)) (data-segment-descriptorbits->p$inline x)))
Theorem:
(defthm data-segment-descriptorbits->p$inline-data-segment-descriptorbits-equiv-congruence-on-x (implies (data-segment-descriptorbits-equiv x x-equiv) (equal (data-segment-descriptorbits->p$inline x) (data-segment-descriptorbits->p$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm data-segment-descriptorbits->p-of-data-segment-descriptorbits (equal (data-segment-descriptorbits->p (data-segment-descriptorbits limit15-0 base15-0 base23-16 a w e msb-of-type s dpl p limit19-16 avl l d/b g base31-24)) (bfix p)))
Theorem:
(defthm data-segment-descriptorbits->p-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x data-segment-descriptorbits-equiv-under-mask) (data-segment-descriptorbits-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 140737488355328) 0)) (equal (data-segment-descriptorbits->p x) (data-segment-descriptorbits->p y))))