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