Access the |X86ISA|::|PWT| field of a cr3bits bit structure.
Function:
(defun cr3bits->pwt$inline (x) (declare (xargs :guard (cr3bits-p x))) (mbe :logic (let ((x (cr3bits-fix x))) (part-select x :low 3 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 61) (ash (the (unsigned-byte 64) x) -3))))))
Theorem:
(defthm bitp-of-cr3bits->pwt (b* ((pwt (cr3bits->pwt$inline x))) (bitp pwt)) :rule-classes :rewrite)
Theorem:
(defthm cr3bits->pwt$inline-of-cr3bits-fix-x (equal (cr3bits->pwt$inline (cr3bits-fix x)) (cr3bits->pwt$inline x)))
Theorem:
(defthm cr3bits->pwt$inline-cr3bits-equiv-congruence-on-x (implies (cr3bits-equiv x x-equiv) (equal (cr3bits->pwt$inline x) (cr3bits->pwt$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cr3bits->pwt-of-cr3bits (equal (cr3bits->pwt (cr3bits res1 pwt pcd res2 pdb res3)) (bfix pwt)))
Theorem:
(defthm cr3bits->pwt-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x cr3bits-equiv-under-mask) (cr3bits-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 8) 0)) (equal (cr3bits->pwt x) (cr3bits->pwt y))))