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