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