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