Update the |X86ISA|::|ADR| field of a prefixes bit structure.
(!prefixes->adr adr x) → new-x
Function:
(defun !prefixes->adr$inline (adr x) (declare (xargs :guard (and (8bits-p adr) (prefixes-p x)))) (mbe :logic (b* ((adr (mbe :logic (8bits-fix adr) :exec adr)) (x (prefixes-fix x))) (part-install adr x :width 8 :low 36)) :exec (the (unsigned-byte 52) (logior (the (unsigned-byte 52) (logand (the (unsigned-byte 52) x) (the (signed-byte 45) -17523466567681))) (the (unsigned-byte 44) (ash (the (unsigned-byte 8) adr) 36))))))
Theorem:
(defthm prefixes-p-of-!prefixes->adr (b* ((new-x (!prefixes->adr$inline adr x))) (prefixes-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !prefixes->adr$inline-of-8bits-fix-adr (equal (!prefixes->adr$inline (8bits-fix adr) x) (!prefixes->adr$inline adr x)))
Theorem:
(defthm !prefixes->adr$inline-8bits-equiv-congruence-on-adr (implies (8bits-equiv adr adr-equiv) (equal (!prefixes->adr$inline adr x) (!prefixes->adr$inline adr-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !prefixes->adr$inline-of-prefixes-fix-x (equal (!prefixes->adr$inline adr (prefixes-fix x)) (!prefixes->adr$inline adr x)))
Theorem:
(defthm !prefixes->adr$inline-prefixes-equiv-congruence-on-x (implies (prefixes-equiv x x-equiv) (equal (!prefixes->adr$inline adr x) (!prefixes->adr$inline adr x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !prefixes->adr-is-prefixes (equal (!prefixes->adr adr x) (change-prefixes x :adr adr)))
Theorem:
(defthm prefixes->adr-of-!prefixes->adr (b* ((?new-x (!prefixes->adr$inline adr x))) (equal (prefixes->adr new-x) (8bits-fix adr))))
Theorem:
(defthm !prefixes->adr-equiv-under-mask (b* ((?new-x (!prefixes->adr$inline adr x))) (prefixes-equiv-under-mask new-x x -17523466567681)))