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