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