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