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