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