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