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