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