Read an unsigned 32-bit integer from an
The register index consists of 5 bits. We read the whole register, which is unsigned.
Function:
(defun read32-xreg-unsigned (reg stat) (declare (xargs :guard (and (ubyte5p reg) (state32p stat)))) (let ((__function__ 'read32-xreg-unsigned)) (declare (ignorable __function__)) (nth (ubyte5-fix reg) (state32->xregfile stat))))
Theorem:
(defthm ubyte32p-of-read32-xreg-unsigned (b* ((val (read32-xreg-unsigned reg stat))) (ubyte32p val)) :rule-classes :rewrite)
Theorem:
(defthm read32-xreg-unsigned-of-ubyte5-fix-reg (equal (read32-xreg-unsigned (ubyte5-fix reg) stat) (read32-xreg-unsigned reg stat)))
Theorem:
(defthm read32-xreg-unsigned-ubyte5-equiv-congruence-on-reg (implies (ubyte5-equiv reg reg-equiv) (equal (read32-xreg-unsigned reg stat) (read32-xreg-unsigned reg-equiv stat))) :rule-classes :congruence)
Theorem:
(defthm read32-xreg-unsigned-of-state32-fix-stat (equal (read32-xreg-unsigned reg (state32-fix stat)) (read32-xreg-unsigned reg stat)))
Theorem:
(defthm read32-xreg-unsigned-state32-equiv-congruence-on-stat (implies (state32-equiv stat stat-equiv) (equal (read32-xreg-unsigned reg stat) (read32-xreg-unsigned reg stat-equiv))) :rule-classes :congruence)