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