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