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