Access the |X86ISA|::|NUM| field of a prefixes bit structure.
(prefixes->num x) → num
Function:
(defun prefixes->num$inline (x) (declare (xargs :guard (prefixes-p x))) (mbe :logic (let ((x (prefixes-fix x))) (part-select x :low 0 :width 4)) :exec (the (unsigned-byte 4) (logand (the (unsigned-byte 4) 15) (the (unsigned-byte 52) x)))))
Theorem:
(defthm 4bits-p-of-prefixes->num (b* ((num (prefixes->num$inline x))) (4bits-p num)) :rule-classes :rewrite)
Theorem:
(defthm prefixes->num$inline-of-prefixes-fix-x (equal (prefixes->num$inline (prefixes-fix x)) (prefixes->num$inline x)))
Theorem:
(defthm prefixes->num$inline-prefixes-equiv-congruence-on-x (implies (prefixes-equiv x x-equiv) (equal (prefixes->num$inline x) (prefixes->num$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm prefixes->num-of-prefixes (equal (prefixes->num (prefixes num lck rep seg opr adr nxt)) (4bits-fix num)))
Theorem:
(defthm prefixes->num-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x prefixes-equiv-under-mask) (prefixes-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 15) 0)) (equal (prefixes->num x) (prefixes->num y))))