Access the |X86ISA|::|SMEP| field of a tlb-key bit structure.
Function:
(defun tlb-key->smep$inline (x) (declare (xargs :guard (tlb-key-p x))) (mbe :logic (let ((x (tlb-key-fix x))) (part-select x :low 1 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 45) (ash (the (unsigned-byte 46) x) -1))))))
Theorem:
(defthm bitp-of-tlb-key->smep (b* ((smep (tlb-key->smep$inline x))) (bitp smep)) :rule-classes :rewrite)
Theorem:
(defthm tlb-key->smep$inline-of-tlb-key-fix-x (equal (tlb-key->smep$inline (tlb-key-fix x)) (tlb-key->smep$inline x)))
Theorem:
(defthm tlb-key->smep$inline-tlb-key-equiv-congruence-on-x (implies (tlb-key-equiv x x-equiv) (equal (tlb-key->smep$inline x) (tlb-key->smep$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm tlb-key->smep-of-tlb-key (equal (tlb-key->smep (tlb-key wp smep smap ac nxe implicit-supervisor-access r-w-x cpl vpn)) (bfix smep)))
Theorem:
(defthm tlb-key->smep-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x tlb-key-equiv-under-mask) (tlb-key-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 2) 0)) (equal (tlb-key->smep x) (tlb-key->smep y))))