Update the |X86ISA|::|S| field of a data-segment-descriptorbits bit structure.
(!data-segment-descriptorbits->s s x) → new-x
Function:
(defun !data-segment-descriptorbits->s$inline (s x) (declare (xargs :guard (and (bitp s) (data-segment-descriptorbits-p x)))) (mbe :logic (b* ((s (mbe :logic (bfix s) :exec s)) (x (data-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 data-segment-descriptorbits-p-of-!data-segment-descriptorbits->s (b* ((new-x (!data-segment-descriptorbits->s$inline s x))) (data-segment-descriptorbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !data-segment-descriptorbits->s$inline-of-bfix-s (equal (!data-segment-descriptorbits->s$inline (bfix s) x) (!data-segment-descriptorbits->s$inline s x)))
Theorem:
(defthm !data-segment-descriptorbits->s$inline-bit-equiv-congruence-on-s (implies (bit-equiv s s-equiv) (equal (!data-segment-descriptorbits->s$inline s x) (!data-segment-descriptorbits->s$inline s-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !data-segment-descriptorbits->s$inline-of-data-segment-descriptorbits-fix-x (equal (!data-segment-descriptorbits->s$inline s (data-segment-descriptorbits-fix x)) (!data-segment-descriptorbits->s$inline s x)))
Theorem:
(defthm !data-segment-descriptorbits->s$inline-data-segment-descriptorbits-equiv-congruence-on-x (implies (data-segment-descriptorbits-equiv x x-equiv) (equal (!data-segment-descriptorbits->s$inline s x) (!data-segment-descriptorbits->s$inline s x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !data-segment-descriptorbits->s-is-data-segment-descriptorbits (equal (!data-segment-descriptorbits->s s x) (change-data-segment-descriptorbits x :s s)))
Theorem:
(defthm data-segment-descriptorbits->s-of-!data-segment-descriptorbits->s (b* ((?new-x (!data-segment-descriptorbits->s$inline s x))) (equal (data-segment-descriptorbits->s new-x) (bfix s))))
Theorem:
(defthm !data-segment-descriptorbits->s-equiv-under-mask (b* ((?new-x (!data-segment-descriptorbits->s$inline s x))) (data-segment-descriptorbits-equiv-under-mask new-x x -17592186044417)))