Access the |ACL2|::|P| field of a call-gate-descriptor-attributesbits bit structure.
(call-gate-descriptor-attributesbits->p x) → p
Function:
(defun call-gate-descriptor-attributesbits->p$inline (x) (declare (xargs :guard (call-gate-descriptor-attributesbits-p x))) (mbe :logic (let ((x (call-gate-descriptor-attributesbits-fix x))) (part-select x :low 7 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 9) (ash (the (unsigned-byte 16) x) -7))))))
Theorem:
(defthm bitp-of-call-gate-descriptor-attributesbits->p (b* ((p (call-gate-descriptor-attributesbits->p$inline x))) (bitp p)) :rule-classes :rewrite)
Theorem:
(defthm call-gate-descriptor-attributesbits->p$inline-of-call-gate-descriptor-attributesbits-fix-x (equal (call-gate-descriptor-attributesbits->p$inline (call-gate-descriptor-attributesbits-fix x)) (call-gate-descriptor-attributesbits->p$inline x)))
Theorem:
(defthm call-gate-descriptor-attributesbits->p$inline-call-gate-descriptor-attributesbits-equiv-congruence-on-x (implies (call-gate-descriptor-attributesbits-equiv x x-equiv) (equal (call-gate-descriptor-attributesbits->p$inline x) (call-gate-descriptor-attributesbits->p$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm call-gate-descriptor-attributesbits->p-of-call-gate-descriptor-attributesbits (equal (call-gate-descriptor-attributesbits->p (call-gate-descriptor-attributesbits type s dpl p unknownbits)) (bfix p)))
Theorem:
(defthm call-gate-descriptor-attributesbits->p-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x call-gate-descriptor-attributesbits-equiv-under-mask) (call-gate-descriptor-attributesbits-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 128) 0)) (equal (call-gate-descriptor-attributesbits->p x) (call-gate-descriptor-attributesbits->p y))))