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