Access the |X86ISA|::|WP| field of a tlb-key bit structure.
Function:
(defun tlb-key->wp$inline (x) (declare (xargs :guard (tlb-key-p x))) (mbe :logic (let ((x (tlb-key-fix x))) (part-select x :low 0 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 46) x)))))
Theorem:
(defthm bitp-of-tlb-key->wp (b* ((wp (tlb-key->wp$inline x))) (bitp wp)) :rule-classes :rewrite)
Theorem:
(defthm tlb-key->wp$inline-of-tlb-key-fix-x (equal (tlb-key->wp$inline (tlb-key-fix x)) (tlb-key->wp$inline x)))
Theorem:
(defthm tlb-key->wp$inline-tlb-key-equiv-congruence-on-x (implies (tlb-key-equiv x x-equiv) (equal (tlb-key->wp$inline x) (tlb-key->wp$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm tlb-key->wp-of-tlb-key (equal (tlb-key->wp (tlb-key wp smep smap ac nxe implicit-supervisor-access r-w-x cpl vpn)) (bfix wp)))
Theorem:
(defthm tlb-key->wp-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) 1) 0)) (equal (tlb-key->wp x) (tlb-key->wp y))))