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