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