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