(rm-low-32 addr x86) → *
Function:
(defun rm-low-32$inline (addr x86) (declare (xargs :stobjs (x86))) (declare (type (unsigned-byte 52) addr)) (declare (xargs :guard (and (not (app-view x86)) (integerp addr) (<= 0 addr) (< (+ 3 addr) *mem-size-in-bytes*)))) (if (mbt (not (app-view x86))) (let ((addr (mbe :logic (ifix addr) :exec addr))) (b* (((the (unsigned-byte 8) byte0) (mbe :logic (loghead 8 (memi addr x86)) :exec (memi addr x86))) ((the (unsigned-byte 8) byte1) (mbe :logic (loghead 8 (memi (1+ addr) x86)) :exec (memi (1+ addr) x86))) ((the (unsigned-byte 16) word0) (logior (the (unsigned-byte 16) (ash byte1 8)) byte0)) ((the (unsigned-byte 8) byte2) (mbe :logic (loghead 8 (memi (+ 2 addr) x86)) :exec (memi (+ 2 addr) x86))) ((the (unsigned-byte 8) byte3) (mbe :logic (loghead 8 (memi (+ 3 addr) x86)) :exec (memi (+ 3 addr) x86))) ((the (unsigned-byte 16) word1) (the (unsigned-byte 16) (logior (the (unsigned-byte 16) (ash byte3 8)) byte2))) ((the (unsigned-byte 32) dword) (logior (the (unsigned-byte 32) (ash word1 16)) word0))) dword)) 0))
Theorem:
(defthm rm-low-32-in-app-view (implies (app-view x86) (equal (rm-low-32 p-addr x86) 0)))
Theorem:
(defthm n32p-rm-low-32 (unsigned-byte-p 32 (rm-low-32 addr x86)) :rule-classes (:rewrite (:type-prescription :corollary (natp (rm-low-32 addr x86)) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp)))) (:linear :corollary (and (<= 0 (rm-low-32 addr x86)) (< (rm-low-32 addr x86) 4294967296)) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))
Theorem:
(defthm rm-low-32-xw (implies (and (not (equal fld :mem)) (not (equal fld :app-view))) (equal (rm-low-32 addr (xw fld index val x86)) (rm-low-32 addr x86))))