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