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