Update the |X86ISA|::|REP| field of a prefixes bit structure.
(!prefixes->rep rep x) → new-x
Function:
(defun !prefixes->rep$inline (rep x) (declare (xargs :guard (and (8bits-p rep) (prefixes-p x)))) (mbe :logic (b* ((rep (mbe :logic (8bits-fix rep) :exec rep)) (x (prefixes-fix x))) (part-install rep x :width 8 :low 12)) :exec (the (unsigned-byte 52) (logior (the (unsigned-byte 52) (logand (the (unsigned-byte 52) x) (the (signed-byte 21) -1044481))) (the (unsigned-byte 20) (ash (the (unsigned-byte 8) rep) 12))))))
Theorem:
(defthm prefixes-p-of-!prefixes->rep (b* ((new-x (!prefixes->rep$inline rep x))) (prefixes-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !prefixes->rep$inline-of-8bits-fix-rep (equal (!prefixes->rep$inline (8bits-fix rep) x) (!prefixes->rep$inline rep x)))
Theorem:
(defthm !prefixes->rep$inline-8bits-equiv-congruence-on-rep (implies (8bits-equiv rep rep-equiv) (equal (!prefixes->rep$inline rep x) (!prefixes->rep$inline rep-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !prefixes->rep$inline-of-prefixes-fix-x (equal (!prefixes->rep$inline rep (prefixes-fix x)) (!prefixes->rep$inline rep x)))
Theorem:
(defthm !prefixes->rep$inline-prefixes-equiv-congruence-on-x (implies (prefixes-equiv x x-equiv) (equal (!prefixes->rep$inline rep x) (!prefixes->rep$inline rep x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !prefixes->rep-is-prefixes (equal (!prefixes->rep rep x) (change-prefixes x :rep rep)))
Theorem:
(defthm prefixes->rep-of-!prefixes->rep (b* ((?new-x (!prefixes->rep$inline rep x))) (equal (prefixes->rep new-x) (8bits-fix rep))))
Theorem:
(defthm !prefixes->rep-equiv-under-mask (b* ((?new-x (!prefixes->rep$inline rep x))) (prefixes-equiv-under-mask new-x x -1044481)))