Read an unsigned 32-bit little endian integer from memory.
This is similar to read64-mem-ubyte16-lendian, but with 4 bytes instead of 2.
Function:
(defun read64-mem-ubyte32-lendian (addr stat) (declare (xargs :guard (and (integerp addr) (state64p stat)))) (let ((__function__ 'read64-mem-ubyte32-lendian)) (declare (ignorable __function__)) (b* ((b0 (read64-mem-ubyte8 addr stat)) (b1 (read64-mem-ubyte8 (+ 1 (ifix addr)) stat)) (b2 (read64-mem-ubyte8 (+ 2 (ifix addr)) stat)) (b3 (read64-mem-ubyte8 (+ 3 (ifix addr)) stat))) (+ b0 (ash b1 8) (ash b2 16) (ash b3 24)))))
Theorem:
(defthm ubyte32p-of-read64-mem-ubyte32-lendian (b* ((val (read64-mem-ubyte32-lendian addr stat))) (ubyte32p val)) :rule-classes :rewrite)
Theorem:
(defthm read64-mem-ubyte32-lendian-of-ifix-addr (equal (read64-mem-ubyte32-lendian (ifix addr) stat) (read64-mem-ubyte32-lendian addr stat)))
Theorem:
(defthm read64-mem-ubyte32-lendian-int-equiv-congruence-on-addr (implies (acl2::int-equiv addr addr-equiv) (equal (read64-mem-ubyte32-lendian addr stat) (read64-mem-ubyte32-lendian addr-equiv stat))) :rule-classes :congruence)
Theorem:
(defthm read64-mem-ubyte32-lendian-of-state64-fix-stat (equal (read64-mem-ubyte32-lendian addr (state64-fix stat)) (read64-mem-ubyte32-lendian addr stat)))
Theorem:
(defthm read64-mem-ubyte32-lendian-state64-equiv-congruence-on-stat (implies (state64-equiv stat stat-equiv) (equal (read64-mem-ubyte32-lendian addr stat) (read64-mem-ubyte32-lendian addr stat-equiv))) :rule-classes :congruence)