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