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