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