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