Access the |X86ISA|::|RES1| field of a cr0bits bit structure.
Function:
(defun cr0bits->res1$inline (x) (declare (xargs :guard (cr0bits-p x))) (mbe :logic (let ((x (cr0bits-fix x))) (part-select x :low 6 :width 10)) :exec (the (unsigned-byte 10) (logand (the (unsigned-byte 10) 1023) (the (unsigned-byte 26) (ash (the (unsigned-byte 32) x) -6))))))
Theorem:
(defthm 10bits-p-of-cr0bits->res1 (b* ((res1 (cr0bits->res1$inline x))) (10bits-p res1)) :rule-classes :rewrite)
Theorem:
(defthm cr0bits->res1$inline-of-cr0bits-fix-x (equal (cr0bits->res1$inline (cr0bits-fix x)) (cr0bits->res1$inline x)))
Theorem:
(defthm cr0bits->res1$inline-cr0bits-equiv-congruence-on-x (implies (cr0bits-equiv x x-equiv) (equal (cr0bits->res1$inline x) (cr0bits->res1$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cr0bits->res1-of-cr0bits (equal (cr0bits->res1 (cr0bits pe mp em ts et ne res1 wp res2 am res3 nw cd pg)) (10bits-fix res1)))
Theorem:
(defthm cr0bits->res1-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x cr0bits-equiv-under-mask) (cr0bits-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 65472) 0)) (equal (cr0bits->res1 x) (cr0bits->res1 y))))