Access the |COMMON-LISP|::|TYPE| field of a system-segment-descriptor-attributesbits bit structure.
(system-segment-descriptor-attributesbits->type x) → type
Function:
(defun system-segment-descriptor-attributesbits->type$inline (x) (declare (xargs :guard (system-segment-descriptor-attributesbits-p x))) (mbe :logic (let ((x (system-segment-descriptor-attributesbits-fix x))) (part-select x :low 0 :width 4)) :exec (the (unsigned-byte 4) (logand (the (unsigned-byte 4) 15) (the (unsigned-byte 16) x)))))
Theorem:
(defthm 4bits-p-of-system-segment-descriptor-attributesbits->type (b* ((type (system-segment-descriptor-attributesbits->type$inline x))) (4bits-p type)) :rule-classes :rewrite)
Theorem:
(defthm system-segment-descriptor-attributesbits->type$inline-of-system-segment-descriptor-attributesbits-fix-x (equal (system-segment-descriptor-attributesbits->type$inline (system-segment-descriptor-attributesbits-fix x)) (system-segment-descriptor-attributesbits->type$inline x)))
Theorem:
(defthm system-segment-descriptor-attributesbits->type$inline-system-segment-descriptor-attributesbits-equiv-congruence-on-x (implies (system-segment-descriptor-attributesbits-equiv x x-equiv) (equal (system-segment-descriptor-attributesbits->type$inline x) (system-segment-descriptor-attributesbits->type$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm system-segment-descriptor-attributesbits->type-of-system-segment-descriptor-attributesbits (equal (system-segment-descriptor-attributesbits->type (system-segment-descriptor-attributesbits type s dpl p avl g unknownbits)) (4bits-fix type)))
Theorem:
(defthm system-segment-descriptor-attributesbits->type-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x system-segment-descriptor-attributesbits-equiv-under-mask) (system-segment-descriptor-attributesbits-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 15) 0)) (equal (system-segment-descriptor-attributesbits->type x) (system-segment-descriptor-attributesbits->type y))))