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