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