Update the |X86ISA|::|AM| field of a cr0bits bit structure.
Function:
(defun !cr0bits->am$inline (am x) (declare (xargs :guard (and (bitp am) (cr0bits-p x)))) (mbe :logic (b* ((am (mbe :logic (bfix am) :exec am)) (x (cr0bits-fix x))) (part-install am x :width 1 :low 18)) :exec (the (unsigned-byte 32) (logior (the (unsigned-byte 32) (logand (the (unsigned-byte 32) x) (the (signed-byte 20) -262145))) (the (unsigned-byte 19) (ash (the (unsigned-byte 1) am) 18))))))
Theorem:
(defthm cr0bits-p-of-!cr0bits->am (b* ((new-x (!cr0bits->am$inline am x))) (cr0bits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !cr0bits->am$inline-of-bfix-am (equal (!cr0bits->am$inline (bfix am) x) (!cr0bits->am$inline am x)))
Theorem:
(defthm !cr0bits->am$inline-bit-equiv-congruence-on-am (implies (bit-equiv am am-equiv) (equal (!cr0bits->am$inline am x) (!cr0bits->am$inline am-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !cr0bits->am$inline-of-cr0bits-fix-x (equal (!cr0bits->am$inline am (cr0bits-fix x)) (!cr0bits->am$inline am x)))
Theorem:
(defthm !cr0bits->am$inline-cr0bits-equiv-congruence-on-x (implies (cr0bits-equiv x x-equiv) (equal (!cr0bits->am$inline am x) (!cr0bits->am$inline am x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !cr0bits->am-is-cr0bits (equal (!cr0bits->am am x) (change-cr0bits x :am am)))
Theorem:
(defthm cr0bits->am-of-!cr0bits->am (b* ((?new-x (!cr0bits->am$inline am x))) (equal (cr0bits->am new-x) (bfix am))))
Theorem:
(defthm !cr0bits->am-equiv-under-mask (b* ((?new-x (!cr0bits->am$inline am x))) (cr0bits-equiv-under-mask new-x x -262145)))