Update the |X86ISA|::|PVI| field of a cr4bits bit structure.
Function:
(defun !cr4bits->pvi$inline (pvi x) (declare (xargs :guard (and (bitp pvi) (cr4bits-p x)))) (mbe :logic (b* ((pvi (mbe :logic (bfix pvi) :exec pvi)) (x (cr4bits-fix x))) (part-install pvi x :width 1 :low 1)) :exec (the (unsigned-byte 26) (logior (the (unsigned-byte 26) (logand (the (unsigned-byte 26) x) (the (signed-byte 3) -3))) (the (unsigned-byte 2) (ash (the (unsigned-byte 1) pvi) 1))))))
Theorem:
(defthm cr4bits-p-of-!cr4bits->pvi (b* ((new-x (!cr4bits->pvi$inline pvi x))) (cr4bits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !cr4bits->pvi$inline-of-bfix-pvi (equal (!cr4bits->pvi$inline (bfix pvi) x) (!cr4bits->pvi$inline pvi x)))
Theorem:
(defthm !cr4bits->pvi$inline-bit-equiv-congruence-on-pvi (implies (bit-equiv pvi pvi-equiv) (equal (!cr4bits->pvi$inline pvi x) (!cr4bits->pvi$inline pvi-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !cr4bits->pvi$inline-of-cr4bits-fix-x (equal (!cr4bits->pvi$inline pvi (cr4bits-fix x)) (!cr4bits->pvi$inline pvi x)))
Theorem:
(defthm !cr4bits->pvi$inline-cr4bits-equiv-congruence-on-x (implies (cr4bits-equiv x x-equiv) (equal (!cr4bits->pvi$inline pvi x) (!cr4bits->pvi$inline pvi x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !cr4bits->pvi-is-cr4bits (equal (!cr4bits->pvi pvi x) (change-cr4bits x :pvi pvi)))
Theorem:
(defthm cr4bits->pvi-of-!cr4bits->pvi (b* ((?new-x (!cr4bits->pvi$inline pvi x))) (equal (cr4bits->pvi new-x) (bfix pvi))))
Theorem:
(defthm !cr4bits->pvi-equiv-under-mask (b* ((?new-x (!cr4bits->pvi$inline pvi x))) (cr4bits-equiv-under-mask new-x x -3)))