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