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