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