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