Update the |X86ISA|::|MSB-OF-TYPE| field of a data-segment-descriptor-attributesbits bit structure.
(!data-segment-descriptor-attributesbits->msb-of-type msb-of-type x) → new-x
Function:
(defun !data-segment-descriptor-attributesbits->msb-of-type$inline (msb-of-type x) (declare (xargs :guard (and (bitp msb-of-type) (data-segment-descriptor-attributesbits-p x)))) (mbe :logic (b* ((msb-of-type (mbe :logic (bfix msb-of-type) :exec msb-of-type)) (x (data-segment-descriptor-attributesbits-fix x))) (part-install msb-of-type x :width 1 :low 3)) :exec (the (unsigned-byte 16) (logior (the (unsigned-byte 16) (logand (the (unsigned-byte 16) x) (the (signed-byte 5) -9))) (the (unsigned-byte 4) (ash (the (unsigned-byte 1) msb-of-type) 3))))))
Theorem:
(defthm data-segment-descriptor-attributesbits-p-of-!data-segment-descriptor-attributesbits->msb-of-type (b* ((new-x (!data-segment-descriptor-attributesbits->msb-of-type$inline msb-of-type x))) (data-segment-descriptor-attributesbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !data-segment-descriptor-attributesbits->msb-of-type$inline-of-bfix-msb-of-type (equal (!data-segment-descriptor-attributesbits->msb-of-type$inline (bfix msb-of-type) x) (!data-segment-descriptor-attributesbits->msb-of-type$inline msb-of-type x)))
Theorem:
(defthm !data-segment-descriptor-attributesbits->msb-of-type$inline-bit-equiv-congruence-on-msb-of-type (implies (bit-equiv msb-of-type msb-of-type-equiv) (equal (!data-segment-descriptor-attributesbits->msb-of-type$inline msb-of-type x) (!data-segment-descriptor-attributesbits->msb-of-type$inline msb-of-type-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !data-segment-descriptor-attributesbits->msb-of-type$inline-of-data-segment-descriptor-attributesbits-fix-x (equal (!data-segment-descriptor-attributesbits->msb-of-type$inline msb-of-type (data-segment-descriptor-attributesbits-fix x)) (!data-segment-descriptor-attributesbits->msb-of-type$inline msb-of-type x)))
Theorem:
(defthm !data-segment-descriptor-attributesbits->msb-of-type$inline-data-segment-descriptor-attributesbits-equiv-congruence-on-x (implies (data-segment-descriptor-attributesbits-equiv x x-equiv) (equal (!data-segment-descriptor-attributesbits->msb-of-type$inline msb-of-type x) (!data-segment-descriptor-attributesbits->msb-of-type$inline msb-of-type x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !data-segment-descriptor-attributesbits->msb-of-type-is-data-segment-descriptor-attributesbits (equal (!data-segment-descriptor-attributesbits->msb-of-type msb-of-type x) (change-data-segment-descriptor-attributesbits x :msb-of-type msb-of-type)))
Theorem:
(defthm data-segment-descriptor-attributesbits->msb-of-type-of-!data-segment-descriptor-attributesbits->msb-of-type (b* ((?new-x (!data-segment-descriptor-attributesbits->msb-of-type$inline msb-of-type x))) (equal (data-segment-descriptor-attributesbits->msb-of-type new-x) (bfix msb-of-type))))
Theorem:
(defthm !data-segment-descriptor-attributesbits->msb-of-type-equiv-under-mask (b* ((?new-x (!data-segment-descriptor-attributesbits->msb-of-type$inline msb-of-type x))) (data-segment-descriptor-attributesbits-equiv-under-mask new-x x -9)))