Update the |X86ISA|::|FTZ| field of a mxcsrbits bit structure.
(!mxcsrbits->ftz ftz x) → new-x
Function:
(defun !mxcsrbits->ftz$inline (ftz x) (declare (xargs :guard (and (bitp ftz) (mxcsrbits-p x)))) (mbe :logic (b* ((ftz (mbe :logic (bfix ftz) :exec ftz)) (x (mxcsrbits-fix x))) (part-install ftz 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) ftz) 15))))))
Theorem:
(defthm mxcsrbits-p-of-!mxcsrbits->ftz (b* ((new-x (!mxcsrbits->ftz$inline ftz x))) (mxcsrbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !mxcsrbits->ftz$inline-of-bfix-ftz (equal (!mxcsrbits->ftz$inline (bfix ftz) x) (!mxcsrbits->ftz$inline ftz x)))
Theorem:
(defthm !mxcsrbits->ftz$inline-bit-equiv-congruence-on-ftz (implies (bit-equiv ftz ftz-equiv) (equal (!mxcsrbits->ftz$inline ftz x) (!mxcsrbits->ftz$inline ftz-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !mxcsrbits->ftz$inline-of-mxcsrbits-fix-x (equal (!mxcsrbits->ftz$inline ftz (mxcsrbits-fix x)) (!mxcsrbits->ftz$inline ftz x)))
Theorem:
(defthm !mxcsrbits->ftz$inline-mxcsrbits-equiv-congruence-on-x (implies (mxcsrbits-equiv x x-equiv) (equal (!mxcsrbits->ftz$inline ftz x) (!mxcsrbits->ftz$inline ftz x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !mxcsrbits->ftz-is-mxcsrbits (equal (!mxcsrbits->ftz ftz x) (change-mxcsrbits x :ftz ftz)))
Theorem:
(defthm mxcsrbits->ftz-of-!mxcsrbits->ftz (b* ((?new-x (!mxcsrbits->ftz$inline ftz x))) (equal (mxcsrbits->ftz new-x) (bfix ftz))))
Theorem:
(defthm !mxcsrbits->ftz-equiv-under-mask (b* ((?new-x (!mxcsrbits->ftz$inline ftz x))) (mxcsrbits-equiv-under-mask new-x x -32769)))