Update the |ACL2|::|P| field of a call-gate-descriptorbits bit structure.
(!call-gate-descriptorbits->p p x) → new-x
Function:
(defun !call-gate-descriptorbits->p$inline (p x) (declare (xargs :guard (and (bitp p) (call-gate-descriptorbits-p x)))) (mbe :logic (b* ((p (mbe :logic (bfix p) :exec p)) (x (call-gate-descriptorbits-fix x))) (part-install p x :width 1 :low 47)) :exec (the (unsigned-byte 128) (logior (the (unsigned-byte 128) (logand (the (unsigned-byte 128) x) (the (signed-byte 49) -140737488355329))) (the (unsigned-byte 48) (ash (the (unsigned-byte 1) p) 47))))))
Theorem:
(defthm call-gate-descriptorbits-p-of-!call-gate-descriptorbits->p (b* ((new-x (!call-gate-descriptorbits->p$inline p x))) (call-gate-descriptorbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !call-gate-descriptorbits->p$inline-of-bfix-p (equal (!call-gate-descriptorbits->p$inline (bfix p) x) (!call-gate-descriptorbits->p$inline p x)))
Theorem:
(defthm !call-gate-descriptorbits->p$inline-bit-equiv-congruence-on-p (implies (bit-equiv p p-equiv) (equal (!call-gate-descriptorbits->p$inline p x) (!call-gate-descriptorbits->p$inline p-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !call-gate-descriptorbits->p$inline-of-call-gate-descriptorbits-fix-x (equal (!call-gate-descriptorbits->p$inline p (call-gate-descriptorbits-fix x)) (!call-gate-descriptorbits->p$inline p 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 p x) (!call-gate-descriptorbits->p$inline p x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !call-gate-descriptorbits->p-is-call-gate-descriptorbits (equal (!call-gate-descriptorbits->p p x) (change-call-gate-descriptorbits x :p p)))
Theorem:
(defthm call-gate-descriptorbits->p-of-!call-gate-descriptorbits->p (b* ((?new-x (!call-gate-descriptorbits->p$inline p x))) (equal (call-gate-descriptorbits->p new-x) (bfix p))))
Theorem:
(defthm !call-gate-descriptorbits->p-equiv-under-mask (b* ((?new-x (!call-gate-descriptorbits->p$inline p x))) (call-gate-descriptorbits-equiv-under-mask new-x x -140737488355329)))