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