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