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