Update the |X86ISA|::|S| field of a interrupt/trap-gate-descriptor-attributesbits bit structure.
(!interrupt/trap-gate-descriptor-attributesbits->s s x) → new-x
Function:
(defun !interrupt/trap-gate-descriptor-attributesbits->s$inline (s x) (declare (xargs :guard (and (bitp s) (interrupt/trap-gate-descriptor-attributesbits-p x)))) (mbe :logic (b* ((s (mbe :logic (bfix s) :exec s)) (x (interrupt/trap-gate-descriptor-attributesbits-fix x))) (part-install s x :width 1 :low 7)) :exec (the (unsigned-byte 16) (logior (the (unsigned-byte 16) (logand (the (unsigned-byte 16) x) (the (signed-byte 9) -129))) (the (unsigned-byte 8) (ash (the (unsigned-byte 1) s) 7))))))
Theorem:
(defthm interrupt/trap-gate-descriptor-attributesbits-p-of-!interrupt/trap-gate-descriptor-attributesbits->s (b* ((new-x (!interrupt/trap-gate-descriptor-attributesbits->s$inline s x))) (interrupt/trap-gate-descriptor-attributesbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->s$inline-of-bfix-s (equal (!interrupt/trap-gate-descriptor-attributesbits->s$inline (bfix s) x) (!interrupt/trap-gate-descriptor-attributesbits->s$inline s x)))
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->s$inline-bit-equiv-congruence-on-s (implies (bit-equiv s s-equiv) (equal (!interrupt/trap-gate-descriptor-attributesbits->s$inline s x) (!interrupt/trap-gate-descriptor-attributesbits->s$inline s-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->s$inline-of-interrupt/trap-gate-descriptor-attributesbits-fix-x (equal (!interrupt/trap-gate-descriptor-attributesbits->s$inline s (interrupt/trap-gate-descriptor-attributesbits-fix x)) (!interrupt/trap-gate-descriptor-attributesbits->s$inline s x)))
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->s$inline-interrupt/trap-gate-descriptor-attributesbits-equiv-congruence-on-x (implies (interrupt/trap-gate-descriptor-attributesbits-equiv x x-equiv) (equal (!interrupt/trap-gate-descriptor-attributesbits->s$inline s x) (!interrupt/trap-gate-descriptor-attributesbits->s$inline s x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->s-is-interrupt/trap-gate-descriptor-attributesbits (equal (!interrupt/trap-gate-descriptor-attributesbits->s s x) (change-interrupt/trap-gate-descriptor-attributesbits x :s s)))
Theorem:
(defthm interrupt/trap-gate-descriptor-attributesbits->s-of-!interrupt/trap-gate-descriptor-attributesbits->s (b* ((?new-x (!interrupt/trap-gate-descriptor-attributesbits->s$inline s x))) (equal (interrupt/trap-gate-descriptor-attributesbits->s new-x) (bfix s))))
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->s-equiv-under-mask (b* ((?new-x (!interrupt/trap-gate-descriptor-attributesbits->s$inline s x))) (interrupt/trap-gate-descriptor-attributesbits-equiv-under-mask new-x x -129)))