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