Update the |X86ISA|::|RES2| field of a system-segment-descriptorbits bit structure.
(!system-segment-descriptorbits->res2 res2 x) → new-x
Function:
(defun !system-segment-descriptorbits->res2$inline (res2 x) (declare (xargs :guard (and (8bits-p res2) (system-segment-descriptorbits-p x)))) (mbe :logic (b* ((res2 (mbe :logic (8bits-fix res2) :exec res2)) (x (system-segment-descriptorbits-fix x))) (part-install res2 x :width 8 :low 96)) :exec (the (unsigned-byte 128) (logior (the (unsigned-byte 128) (logand (the (unsigned-byte 128) x) (the (signed-byte 105) -20203181441137406086353707335681))) (the (unsigned-byte 104) (ash (the (unsigned-byte 8) res2) 96))))))
Theorem:
(defthm system-segment-descriptorbits-p-of-!system-segment-descriptorbits->res2 (b* ((new-x (!system-segment-descriptorbits->res2$inline res2 x))) (system-segment-descriptorbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !system-segment-descriptorbits->res2$inline-of-8bits-fix-res2 (equal (!system-segment-descriptorbits->res2$inline (8bits-fix res2) x) (!system-segment-descriptorbits->res2$inline res2 x)))
Theorem:
(defthm !system-segment-descriptorbits->res2$inline-8bits-equiv-congruence-on-res2 (implies (8bits-equiv res2 res2-equiv) (equal (!system-segment-descriptorbits->res2$inline res2 x) (!system-segment-descriptorbits->res2$inline res2-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !system-segment-descriptorbits->res2$inline-of-system-segment-descriptorbits-fix-x (equal (!system-segment-descriptorbits->res2$inline res2 (system-segment-descriptorbits-fix x)) (!system-segment-descriptorbits->res2$inline res2 x)))
Theorem:
(defthm !system-segment-descriptorbits->res2$inline-system-segment-descriptorbits-equiv-congruence-on-x (implies (system-segment-descriptorbits-equiv x x-equiv) (equal (!system-segment-descriptorbits->res2$inline res2 x) (!system-segment-descriptorbits->res2$inline res2 x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !system-segment-descriptorbits->res2-is-system-segment-descriptorbits (equal (!system-segment-descriptorbits->res2 res2 x) (change-system-segment-descriptorbits x :res2 res2)))
Theorem:
(defthm system-segment-descriptorbits->res2-of-!system-segment-descriptorbits->res2 (b* ((?new-x (!system-segment-descriptorbits->res2$inline res2 x))) (equal (system-segment-descriptorbits->res2 new-x) (8bits-fix res2))))
Theorem:
(defthm !system-segment-descriptorbits->res2-equiv-under-mask (b* ((?new-x (!system-segment-descriptorbits->res2$inline res2 x))) (system-segment-descriptorbits-equiv-under-mask new-x x -20203181441137406086353707335681)))