Access the |X86ISA|::|CR8-TRPL| field of a cr8bits bit structure.
Function:
(defun cr8bits->cr8-trpl$inline (x) (declare (xargs :guard (cr8bits-p x))) (mbe :logic (let ((x (cr8bits-fix x))) (part-select x :low 0 :width 4)) :exec (the (unsigned-byte 4) (logand (the (unsigned-byte 4) 15) (the (unsigned-byte 4) x)))))
Theorem:
(defthm 4bits-p-of-cr8bits->cr8-trpl (b* ((cr8-trpl (cr8bits->cr8-trpl$inline x))) (4bits-p cr8-trpl)) :rule-classes :rewrite)
Theorem:
(defthm cr8bits->cr8-trpl$inline-of-cr8bits-fix-x (equal (cr8bits->cr8-trpl$inline (cr8bits-fix x)) (cr8bits->cr8-trpl$inline x)))
Theorem:
(defthm cr8bits->cr8-trpl$inline-cr8bits-equiv-congruence-on-x (implies (cr8bits-equiv x x-equiv) (equal (cr8bits->cr8-trpl$inline x) (cr8bits->cr8-trpl$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cr8bits->cr8-trpl-of-cr8bits (equal (cr8bits->cr8-trpl (cr8bits cr8-trpl)) (4bits-fix cr8-trpl)))
Theorem:
(defthm cr8bits->cr8-trpl-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x cr8bits-equiv-under-mask) (cr8bits-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 15) 0)) (equal (cr8bits->cr8-trpl x) (cr8bits->cr8-trpl y))))