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