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