Update the |X86ISA|::|NW| field of a cr0bits bit structure.
Function:
(defun !cr0bits->nw$inline (nw x) (declare (xargs :guard (and (bitp nw) (cr0bits-p x)))) (mbe :logic (b* ((nw (mbe :logic (bfix nw) :exec nw)) (x (cr0bits-fix x))) (part-install nw x :width 1 :low 29)) :exec (the (unsigned-byte 32) (logior (the (unsigned-byte 32) (logand (the (unsigned-byte 32) x) (the (signed-byte 31) -536870913))) (the (unsigned-byte 30) (ash (the (unsigned-byte 1) nw) 29))))))
Theorem:
(defthm cr0bits-p-of-!cr0bits->nw (b* ((new-x (!cr0bits->nw$inline nw x))) (cr0bits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !cr0bits->nw$inline-of-bfix-nw (equal (!cr0bits->nw$inline (bfix nw) x) (!cr0bits->nw$inline nw x)))
Theorem:
(defthm !cr0bits->nw$inline-bit-equiv-congruence-on-nw (implies (bit-equiv nw nw-equiv) (equal (!cr0bits->nw$inline nw x) (!cr0bits->nw$inline nw-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !cr0bits->nw$inline-of-cr0bits-fix-x (equal (!cr0bits->nw$inline nw (cr0bits-fix x)) (!cr0bits->nw$inline nw x)))
Theorem:
(defthm !cr0bits->nw$inline-cr0bits-equiv-congruence-on-x (implies (cr0bits-equiv x x-equiv) (equal (!cr0bits->nw$inline nw x) (!cr0bits->nw$inline nw x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !cr0bits->nw-is-cr0bits (equal (!cr0bits->nw nw x) (change-cr0bits x :nw nw)))
Theorem:
(defthm cr0bits->nw-of-!cr0bits->nw (b* ((?new-x (!cr0bits->nw$inline nw x))) (equal (cr0bits->nw new-x) (bfix nw))))
Theorem:
(defthm !cr0bits->nw-equiv-under-mask (b* ((?new-x (!cr0bits->nw$inline nw x))) (cr0bits-equiv-under-mask new-x x -536870913)))