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