Update the |X86ISA|::|DPL| field of a interrupt/trap-gate-descriptor-attributesbits bit structure.
(!interrupt/trap-gate-descriptor-attributesbits->dpl dpl x) → new-x
Function:
(defun !interrupt/trap-gate-descriptor-attributesbits->dpl$inline (dpl x) (declare (xargs :guard (and (2bits-p dpl) (interrupt/trap-gate-descriptor-attributesbits-p x)))) (mbe :logic (b* ((dpl (mbe :logic (2bits-fix dpl) :exec dpl)) (x (interrupt/trap-gate-descriptor-attributesbits-fix x))) (part-install dpl x :width 2 :low 8)) :exec (the (unsigned-byte 16) (logior (the (unsigned-byte 16) (logand (the (unsigned-byte 16) x) (the (signed-byte 11) -769))) (the (unsigned-byte 10) (ash (the (unsigned-byte 2) dpl) 8))))))
Theorem:
(defthm interrupt/trap-gate-descriptor-attributesbits-p-of-!interrupt/trap-gate-descriptor-attributesbits->dpl (b* ((new-x (!interrupt/trap-gate-descriptor-attributesbits->dpl$inline dpl x))) (interrupt/trap-gate-descriptor-attributesbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->dpl$inline-of-2bits-fix-dpl (equal (!interrupt/trap-gate-descriptor-attributesbits->dpl$inline (2bits-fix dpl) x) (!interrupt/trap-gate-descriptor-attributesbits->dpl$inline dpl x)))
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->dpl$inline-2bits-equiv-congruence-on-dpl (implies (2bits-equiv dpl dpl-equiv) (equal (!interrupt/trap-gate-descriptor-attributesbits->dpl$inline dpl x) (!interrupt/trap-gate-descriptor-attributesbits->dpl$inline dpl-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->dpl$inline-of-interrupt/trap-gate-descriptor-attributesbits-fix-x (equal (!interrupt/trap-gate-descriptor-attributesbits->dpl$inline dpl (interrupt/trap-gate-descriptor-attributesbits-fix x)) (!interrupt/trap-gate-descriptor-attributesbits->dpl$inline dpl x)))
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->dpl$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->dpl$inline dpl x) (!interrupt/trap-gate-descriptor-attributesbits->dpl$inline dpl x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->dpl-is-interrupt/trap-gate-descriptor-attributesbits (equal (!interrupt/trap-gate-descriptor-attributesbits->dpl dpl x) (change-interrupt/trap-gate-descriptor-attributesbits x :dpl dpl)))
Theorem:
(defthm interrupt/trap-gate-descriptor-attributesbits->dpl-of-!interrupt/trap-gate-descriptor-attributesbits->dpl (b* ((?new-x (!interrupt/trap-gate-descriptor-attributesbits->dpl$inline dpl x))) (equal (interrupt/trap-gate-descriptor-attributesbits->dpl new-x) (2bits-fix dpl))))
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->dpl-equiv-under-mask (b* ((?new-x (!interrupt/trap-gate-descriptor-attributesbits->dpl$inline dpl x))) (interrupt/trap-gate-descriptor-attributesbits-equiv-under-mask new-x x -769)))