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