Update the |X86ISA|::|VPN| field of a tlb-key bit structure.
Function:
(defun !tlb-key->vpn$inline (vpn x) (declare (xargs :guard (and (36bits-p vpn) (tlb-key-p x)))) (mbe :logic (b* ((vpn (mbe :logic (36bits-fix vpn) :exec vpn)) (x (tlb-key-fix x))) (part-install vpn x :width 36 :low 10)) :exec (the (unsigned-byte 46) (logior (the (unsigned-byte 46) (logand (the (unsigned-byte 46) x) (the (signed-byte 47) -70368744176641))) (the (unsigned-byte 46) (ash (the (unsigned-byte 36) vpn) 10))))))
Theorem:
(defthm tlb-key-p-of-!tlb-key->vpn (b* ((new-x (!tlb-key->vpn$inline vpn x))) (tlb-key-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !tlb-key->vpn$inline-of-36bits-fix-vpn (equal (!tlb-key->vpn$inline (36bits-fix vpn) x) (!tlb-key->vpn$inline vpn x)))
Theorem:
(defthm !tlb-key->vpn$inline-36bits-equiv-congruence-on-vpn (implies (36bits-equiv vpn vpn-equiv) (equal (!tlb-key->vpn$inline vpn x) (!tlb-key->vpn$inline vpn-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !tlb-key->vpn$inline-of-tlb-key-fix-x (equal (!tlb-key->vpn$inline vpn (tlb-key-fix x)) (!tlb-key->vpn$inline vpn x)))
Theorem:
(defthm !tlb-key->vpn$inline-tlb-key-equiv-congruence-on-x (implies (tlb-key-equiv x x-equiv) (equal (!tlb-key->vpn$inline vpn x) (!tlb-key->vpn$inline vpn x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !tlb-key->vpn-is-tlb-key (equal (!tlb-key->vpn vpn x) (change-tlb-key x :vpn vpn)))
Theorem:
(defthm tlb-key->vpn-of-!tlb-key->vpn (b* ((?new-x (!tlb-key->vpn$inline vpn x))) (equal (tlb-key->vpn new-x) (36bits-fix vpn))))
Theorem:
(defthm !tlb-key->vpn-equiv-under-mask (b* ((?new-x (!tlb-key->vpn$inline vpn x))) (tlb-key-equiv-under-mask new-x x 1023)))