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