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