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