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