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