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