Update the |X86ISA|::|DPL| field of a code-segment-descriptorbits bit structure.
(!code-segment-descriptorbits->dpl dpl x) → new-x
Function:
(defun !code-segment-descriptorbits->dpl$inline (dpl x) (declare (xargs :guard (and (2bits-p dpl) (code-segment-descriptorbits-p x)))) (mbe :logic (b* ((dpl (mbe :logic (2bits-fix dpl) :exec dpl)) (x (code-segment-descriptorbits-fix x))) (part-install dpl x :width 2 :low 45)) :exec (the (unsigned-byte 64) (logior (the (unsigned-byte 64) (logand (the (unsigned-byte 64) x) (the (signed-byte 48) -105553116266497))) (the (unsigned-byte 47) (ash (the (unsigned-byte 2) dpl) 45))))))
Theorem:
(defthm code-segment-descriptorbits-p-of-!code-segment-descriptorbits->dpl (b* ((new-x (!code-segment-descriptorbits->dpl$inline dpl x))) (code-segment-descriptorbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !code-segment-descriptorbits->dpl$inline-of-2bits-fix-dpl (equal (!code-segment-descriptorbits->dpl$inline (2bits-fix dpl) x) (!code-segment-descriptorbits->dpl$inline dpl x)))
Theorem:
(defthm !code-segment-descriptorbits->dpl$inline-2bits-equiv-congruence-on-dpl (implies (2bits-equiv dpl dpl-equiv) (equal (!code-segment-descriptorbits->dpl$inline dpl x) (!code-segment-descriptorbits->dpl$inline dpl-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !code-segment-descriptorbits->dpl$inline-of-code-segment-descriptorbits-fix-x (equal (!code-segment-descriptorbits->dpl$inline dpl (code-segment-descriptorbits-fix x)) (!code-segment-descriptorbits->dpl$inline dpl x)))
Theorem:
(defthm !code-segment-descriptorbits->dpl$inline-code-segment-descriptorbits-equiv-congruence-on-x (implies (code-segment-descriptorbits-equiv x x-equiv) (equal (!code-segment-descriptorbits->dpl$inline dpl x) (!code-segment-descriptorbits->dpl$inline dpl x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !code-segment-descriptorbits->dpl-is-code-segment-descriptorbits (equal (!code-segment-descriptorbits->dpl dpl x) (change-code-segment-descriptorbits x :dpl dpl)))
Theorem:
(defthm code-segment-descriptorbits->dpl-of-!code-segment-descriptorbits->dpl (b* ((?new-x (!code-segment-descriptorbits->dpl$inline dpl x))) (equal (code-segment-descriptorbits->dpl new-x) (2bits-fix dpl))))
Theorem:
(defthm !code-segment-descriptorbits->dpl-equiv-under-mask (b* ((?new-x (!code-segment-descriptorbits->dpl$inline dpl x))) (code-segment-descriptorbits-equiv-under-mask new-x x -105553116266497)))