Access the |COMMON-LISP|::|TYPE| field of a system-segment-descriptorbits bit structure.
(system-segment-descriptorbits->type x) → type
Function:
(defun system-segment-descriptorbits->type$inline (x) (declare (xargs :guard (system-segment-descriptorbits-p x))) (mbe :logic (let ((x (system-segment-descriptorbits-fix x))) (part-select x :low 40 :width 4)) :exec (the (unsigned-byte 4) (logand (the (unsigned-byte 4) 15) (the (unsigned-byte 88) (ash (the (unsigned-byte 128) x) -40))))))
Theorem:
(defthm 4bits-p-of-system-segment-descriptorbits->type (b* ((type (system-segment-descriptorbits->type$inline x))) (4bits-p type)) :rule-classes :rewrite)
Theorem:
(defthm system-segment-descriptorbits->type$inline-of-system-segment-descriptorbits-fix-x (equal (system-segment-descriptorbits->type$inline (system-segment-descriptorbits-fix x)) (system-segment-descriptorbits->type$inline x)))
Theorem:
(defthm system-segment-descriptorbits->type$inline-system-segment-descriptorbits-equiv-congruence-on-x (implies (system-segment-descriptorbits-equiv x x-equiv) (equal (system-segment-descriptorbits->type$inline x) (system-segment-descriptorbits->type$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm system-segment-descriptorbits->type-of-system-segment-descriptorbits (equal (system-segment-descriptorbits->type (system-segment-descriptorbits limit15-0 base15-0 base23-16 type s dpl p limit19-16 avl res1 g base31-24 base63-32 res2 all-zeroes? res3)) (4bits-fix type)))
Theorem:
(defthm system-segment-descriptorbits->type-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x system-segment-descriptorbits-equiv-under-mask) (system-segment-descriptorbits-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 16492674416640) 0)) (equal (system-segment-descriptorbits->type x) (system-segment-descriptorbits->type y))))