Update the |ACL2|::|L| field of a data-segment-descriptorbits bit structure.
(!data-segment-descriptorbits->l l x) → new-x
Function:
(defun !data-segment-descriptorbits->l$inline (l x) (declare (xargs :guard (and (bitp l) (data-segment-descriptorbits-p x)))) (mbe :logic (b* ((l (mbe :logic (bfix l) :exec l)) (x (data-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 data-segment-descriptorbits-p-of-!data-segment-descriptorbits->l (b* ((new-x (!data-segment-descriptorbits->l$inline l x))) (data-segment-descriptorbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !data-segment-descriptorbits->l$inline-of-bfix-l (equal (!data-segment-descriptorbits->l$inline (bfix l) x) (!data-segment-descriptorbits->l$inline l x)))
Theorem:
(defthm !data-segment-descriptorbits->l$inline-bit-equiv-congruence-on-l (implies (bit-equiv l l-equiv) (equal (!data-segment-descriptorbits->l$inline l x) (!data-segment-descriptorbits->l$inline l-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !data-segment-descriptorbits->l$inline-of-data-segment-descriptorbits-fix-x (equal (!data-segment-descriptorbits->l$inline l (data-segment-descriptorbits-fix x)) (!data-segment-descriptorbits->l$inline l x)))
Theorem:
(defthm !data-segment-descriptorbits->l$inline-data-segment-descriptorbits-equiv-congruence-on-x (implies (data-segment-descriptorbits-equiv x x-equiv) (equal (!data-segment-descriptorbits->l$inline l x) (!data-segment-descriptorbits->l$inline l x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !data-segment-descriptorbits->l-is-data-segment-descriptorbits (equal (!data-segment-descriptorbits->l l x) (change-data-segment-descriptorbits x :l l)))
Theorem:
(defthm data-segment-descriptorbits->l-of-!data-segment-descriptorbits->l (b* ((?new-x (!data-segment-descriptorbits->l$inline l x))) (equal (data-segment-descriptorbits->l new-x) (bfix l))))
Theorem:
(defthm !data-segment-descriptorbits->l-equiv-under-mask (b* ((?new-x (!data-segment-descriptorbits->l$inline l x))) (data-segment-descriptorbits-equiv-under-mask new-x x -9007199254740993)))