Access the |X86ISA|::|RES3| field of a cr3bits bit structure.
Function:
(defun cr3bits->res3$inline (x) (declare (xargs :guard (cr3bits-p x))) (mbe :logic (let ((x (cr3bits-fix x))) (part-select x :low 52 :width 12)) :exec (the (unsigned-byte 12) (logand (the (unsigned-byte 12) 4095) (the (unsigned-byte 12) (ash (the (unsigned-byte 64) x) -52))))))
Theorem:
(defthm 12bits-p-of-cr3bits->res3 (b* ((res3 (cr3bits->res3$inline x))) (12bits-p res3)) :rule-classes :rewrite)
Theorem:
(defthm cr3bits->res3$inline-of-cr3bits-fix-x (equal (cr3bits->res3$inline (cr3bits-fix x)) (cr3bits->res3$inline x)))
Theorem:
(defthm cr3bits->res3$inline-cr3bits-equiv-congruence-on-x (implies (cr3bits-equiv x x-equiv) (equal (cr3bits->res3$inline x) (cr3bits->res3$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cr3bits->res3-of-cr3bits (equal (cr3bits->res3 (cr3bits res1 pwt pcd res2 pdb res3)) (12bits-fix res3)))
Theorem:
(defthm cr3bits->res3-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) 18442240474082181120) 0)) (equal (cr3bits->res3 x) (cr3bits->res3 y))))