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