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