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