Update the |X86ISA|::|MSB-OF-TYPE| field of a code-segment-descriptorbits bit structure.
(!code-segment-descriptorbits->msb-of-type msb-of-type x) → new-x
Function:
(defun !code-segment-descriptorbits->msb-of-type$inline (msb-of-type x) (declare (xargs :guard (and (bitp msb-of-type) (code-segment-descriptorbits-p x)))) (mbe :logic (b* ((msb-of-type (mbe :logic (bfix msb-of-type) :exec msb-of-type)) (x (code-segment-descriptorbits-fix x))) (part-install msb-of-type x :width 1 :low 43)) :exec (the (unsigned-byte 64) (logior (the (unsigned-byte 64) (logand (the (unsigned-byte 64) x) (the (signed-byte 45) -8796093022209))) (the (unsigned-byte 44) (ash (the (unsigned-byte 1) msb-of-type) 43))))))
Theorem:
(defthm code-segment-descriptorbits-p-of-!code-segment-descriptorbits->msb-of-type (b* ((new-x (!code-segment-descriptorbits->msb-of-type$inline msb-of-type x))) (code-segment-descriptorbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !code-segment-descriptorbits->msb-of-type$inline-of-bfix-msb-of-type (equal (!code-segment-descriptorbits->msb-of-type$inline (bfix msb-of-type) x) (!code-segment-descriptorbits->msb-of-type$inline msb-of-type x)))
Theorem:
(defthm !code-segment-descriptorbits->msb-of-type$inline-bit-equiv-congruence-on-msb-of-type (implies (bit-equiv msb-of-type msb-of-type-equiv) (equal (!code-segment-descriptorbits->msb-of-type$inline msb-of-type x) (!code-segment-descriptorbits->msb-of-type$inline msb-of-type-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !code-segment-descriptorbits->msb-of-type$inline-of-code-segment-descriptorbits-fix-x (equal (!code-segment-descriptorbits->msb-of-type$inline msb-of-type (code-segment-descriptorbits-fix x)) (!code-segment-descriptorbits->msb-of-type$inline msb-of-type x)))
Theorem:
(defthm !code-segment-descriptorbits->msb-of-type$inline-code-segment-descriptorbits-equiv-congruence-on-x (implies (code-segment-descriptorbits-equiv x x-equiv) (equal (!code-segment-descriptorbits->msb-of-type$inline msb-of-type x) (!code-segment-descriptorbits->msb-of-type$inline msb-of-type x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !code-segment-descriptorbits->msb-of-type-is-code-segment-descriptorbits (equal (!code-segment-descriptorbits->msb-of-type msb-of-type x) (change-code-segment-descriptorbits x :msb-of-type msb-of-type)))
Theorem:
(defthm code-segment-descriptorbits->msb-of-type-of-!code-segment-descriptorbits->msb-of-type (b* ((?new-x (!code-segment-descriptorbits->msb-of-type$inline msb-of-type x))) (equal (code-segment-descriptorbits->msb-of-type new-x) (bfix msb-of-type))))
Theorem:
(defthm !code-segment-descriptorbits->msb-of-type-equiv-under-mask (b* ((?new-x (!code-segment-descriptorbits->msb-of-type$inline msb-of-type x))) (code-segment-descriptorbits-equiv-under-mask new-x x -8796093022209)))