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