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