Access the |ACL2|::|TOP| field of a fp-statusbits bit structure.
(fp-statusbits->top x) → top
Function:
(defun fp-statusbits->top$inline (x) (declare (xargs :guard (fp-statusbits-p x))) (mbe :logic (let ((x (fp-statusbits-fix x))) (part-select x :low 11 :width 3)) :exec (the (unsigned-byte 3) (logand (the (unsigned-byte 3) 7) (the (unsigned-byte 5) (ash (the (unsigned-byte 16) x) -11))))))
Theorem:
(defthm 3bits-p-of-fp-statusbits->top (b* ((top (fp-statusbits->top$inline x))) (3bits-p top)) :rule-classes :rewrite)
Theorem:
(defthm fp-statusbits->top$inline-of-fp-statusbits-fix-x (equal (fp-statusbits->top$inline (fp-statusbits-fix x)) (fp-statusbits->top$inline x)))
Theorem:
(defthm fp-statusbits->top$inline-fp-statusbits-equiv-congruence-on-x (implies (fp-statusbits-equiv x x-equiv) (equal (fp-statusbits->top$inline x) (fp-statusbits->top$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm fp-statusbits->top-of-fp-statusbits (equal (fp-statusbits->top (fp-statusbits ie de ze oe ue pe sf es c0 c1 c2 top c3 b)) (3bits-fix top)))
Theorem:
(defthm fp-statusbits->top-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) 14336) 0)) (equal (fp-statusbits->top x) (fp-statusbits->top y))))