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