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