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