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