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