Update the |X86ISA|::|NXE| field of a tlb-key bit structure.
Function:
(defun !tlb-key->nxe$inline (nxe x) (declare (xargs :guard (and (bitp nxe) (tlb-key-p x)))) (mbe :logic (b* ((nxe (mbe :logic (bfix nxe) :exec nxe)) (x (tlb-key-fix x))) (part-install nxe x :width 1 :low 4)) :exec (the (unsigned-byte 46) (logior (the (unsigned-byte 46) (logand (the (unsigned-byte 46) x) (the (signed-byte 6) -17))) (the (unsigned-byte 5) (ash (the (unsigned-byte 1) nxe) 4))))))
Theorem:
(defthm tlb-key-p-of-!tlb-key->nxe (b* ((new-x (!tlb-key->nxe$inline nxe x))) (tlb-key-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !tlb-key->nxe$inline-of-bfix-nxe (equal (!tlb-key->nxe$inline (bfix nxe) x) (!tlb-key->nxe$inline nxe x)))
Theorem:
(defthm !tlb-key->nxe$inline-bit-equiv-congruence-on-nxe (implies (bit-equiv nxe nxe-equiv) (equal (!tlb-key->nxe$inline nxe x) (!tlb-key->nxe$inline nxe-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !tlb-key->nxe$inline-of-tlb-key-fix-x (equal (!tlb-key->nxe$inline nxe (tlb-key-fix x)) (!tlb-key->nxe$inline nxe x)))
Theorem:
(defthm !tlb-key->nxe$inline-tlb-key-equiv-congruence-on-x (implies (tlb-key-equiv x x-equiv) (equal (!tlb-key->nxe$inline nxe x) (!tlb-key->nxe$inline nxe x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !tlb-key->nxe-is-tlb-key (equal (!tlb-key->nxe nxe x) (change-tlb-key x :nxe nxe)))
Theorem:
(defthm tlb-key->nxe-of-!tlb-key->nxe (b* ((?new-x (!tlb-key->nxe$inline nxe x))) (equal (tlb-key->nxe new-x) (bfix nxe))))
Theorem:
(defthm !tlb-key->nxe-equiv-under-mask (b* ((?new-x (!tlb-key->nxe$inline nxe x))) (tlb-key-equiv-under-mask new-x x -17)))