Access the |ACL2|::|PE| field of a fp-statusbits bit structure.
(fp-statusbits->pe x) → pe
Function:
(defun fp-statusbits->pe$inline (x) (declare (xargs :guard (fp-statusbits-p x))) (mbe :logic (let ((x (fp-statusbits-fix x))) (part-select x :low 5 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 11) (ash (the (unsigned-byte 16) x) -5))))))
Theorem:
(defthm bitp-of-fp-statusbits->pe (b* ((pe (fp-statusbits->pe$inline x))) (bitp pe)) :rule-classes :rewrite)
Theorem:
(defthm fp-statusbits->pe$inline-of-fp-statusbits-fix-x (equal (fp-statusbits->pe$inline (fp-statusbits-fix x)) (fp-statusbits->pe$inline x)))
Theorem:
(defthm fp-statusbits->pe$inline-fp-statusbits-equiv-congruence-on-x (implies (fp-statusbits-equiv x x-equiv) (equal (fp-statusbits->pe$inline x) (fp-statusbits->pe$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm fp-statusbits->pe-of-fp-statusbits (equal (fp-statusbits->pe (fp-statusbits ie de ze oe ue pe sf es c0 c1 c2 top c3 b)) (bfix pe)))
Theorem:
(defthm fp-statusbits->pe-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x fp-statusbits-equiv-under-mask) (fp-statusbits-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 32) 0)) (equal (fp-statusbits->pe x) (fp-statusbits->pe y))))