Access the |ACL2|::|P| field of a call-gate-descriptorbits bit structure.
(call-gate-descriptorbits->p x) → p
Function:
(defun call-gate-descriptorbits->p$inline (x) (declare (xargs :guard (call-gate-descriptorbits-p x))) (mbe :logic (let ((x (call-gate-descriptorbits-fix x))) (part-select x :low 47 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 81) (ash (the (unsigned-byte 128) x) -47))))))
Theorem:
(defthm bitp-of-call-gate-descriptorbits->p (b* ((p (call-gate-descriptorbits->p$inline x))) (bitp p)) :rule-classes :rewrite)
Theorem:
(defthm call-gate-descriptorbits->p$inline-of-call-gate-descriptorbits-fix-x (equal (call-gate-descriptorbits->p$inline (call-gate-descriptorbits-fix x)) (call-gate-descriptorbits->p$inline x)))
Theorem:
(defthm call-gate-descriptorbits->p$inline-call-gate-descriptorbits-equiv-congruence-on-x (implies (call-gate-descriptorbits-equiv x x-equiv) (equal (call-gate-descriptorbits->p$inline x) (call-gate-descriptorbits->p$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm call-gate-descriptorbits->p-of-call-gate-descriptorbits (equal (call-gate-descriptorbits->p (call-gate-descriptorbits offset15-0 selector res1 type s dpl p offset31-16 offset63-32 res2 all-zeroes? res3)) (bfix p)))
Theorem:
(defthm call-gate-descriptorbits->p-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x call-gate-descriptorbits-equiv-under-mask) (call-gate-descriptorbits-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 140737488355328) 0)) (equal (call-gate-descriptorbits->p x) (call-gate-descriptorbits->p y))))