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