Read an unsigned 32-bit integer
from the low bits of an
The register index consists of 5 bits. We read an unsigned 64-bit integer from the register, and we keep the low 32 bits, stil unsigned.
Function:
(defun read64-xreg-unsigned32 (reg stat) (declare (xargs :guard (and (ubyte5p reg) (state64p stat)))) (let ((__function__ 'read64-xreg-unsigned32)) (declare (ignorable __function__)) (loghead 32 (read64-xreg-unsigned reg stat))))
Theorem:
(defthm ubyte32p-of-read64-xreg-unsigned32 (b* ((val (read64-xreg-unsigned32 reg stat))) (ubyte32p val)) :rule-classes :rewrite)
Theorem:
(defthm read64-xreg-unsigned32-of-ubyte5-fix-reg (equal (read64-xreg-unsigned32 (ubyte5-fix reg) stat) (read64-xreg-unsigned32 reg stat)))
Theorem:
(defthm read64-xreg-unsigned32-ubyte5-equiv-congruence-on-reg (implies (ubyte5-equiv reg reg-equiv) (equal (read64-xreg-unsigned32 reg stat) (read64-xreg-unsigned32 reg-equiv stat))) :rule-classes :congruence)
Theorem:
(defthm read64-xreg-unsigned32-of-state64-fix-stat (equal (read64-xreg-unsigned32 reg (state64-fix stat)) (read64-xreg-unsigned32 reg stat)))
Theorem:
(defthm read64-xreg-unsigned32-state64-equiv-congruence-on-stat (implies (state64-equiv stat stat-equiv) (equal (read64-xreg-unsigned32 reg stat) (read64-xreg-unsigned32 reg stat-equiv))) :rule-classes :congruence)