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