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