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