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