(rvm32 addr x86) → (mv * * x86)
Function:
(defun rvm32$inline (addr x86) (declare (xargs :stobjs (x86))) (declare (type (signed-byte 48) addr)) (if (mbt (canonical-address-p addr)) (let* ((1+addr (the (signed-byte 49) (+ 1 (the (signed-byte 48) addr)))) (2+addr (the (signed-byte 49) (+ 2 (the (signed-byte 48) addr)))) (3+addr (the (signed-byte 49) (+ 3 (the (signed-byte 48) addr))))) (if (mbe :logic (canonical-address-p (+ 3 addr)) :exec (< (the (signed-byte 49) 3+addr) 140737488355328)) (b* (((the (unsigned-byte 8) byte0) (memi (n48 addr) x86)) ((the (unsigned-byte 8) byte1) (memi (n48 1+addr) x86)) ((the (unsigned-byte 8) byte2) (memi (n48 2+addr) x86)) ((the (unsigned-byte 8) byte3) (memi (n48 3+addr) x86)) ((the (unsigned-byte 16) word1) (logior byte2 (the (unsigned-byte 16) (ash byte3 8)))) ((the (unsigned-byte 24) high-24) (logior byte1 (the (unsigned-byte 24) (ash word1 8)))) ((the (unsigned-byte 32) dword) (logior byte0 (the (unsigned-byte 32) (ash high-24 8))))) (mv nil dword x86)) (mv 'rvm32 0 x86))) (mv 'rvm32 0 x86)))
Theorem:
(defthm rvm32-no-error (implies (and (canonical-address-p addr) (canonical-address-p (+ 3 addr))) (equal (mv-nth 0 (rvm32 addr x86)) nil)))
Theorem:
(defthm n32p-mv-nth-1-rvm32 (unsigned-byte-p 32 (mv-nth 1 (rvm32 addr x86))) :rule-classes (:rewrite (:type-prescription :corollary (natp (mv-nth 1 (rvm32 addr x86))) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp)))) (:linear :corollary (and (<= 0 (mv-nth 1 (rvm32 addr x86))) (< (mv-nth 1 (rvm32 addr x86)) 4294967296)) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))
Theorem:
(defthm x86p-mv-nth-2-rvm32-unchanged (equal (mv-nth 2 (rvm32 addr x86)) x86))
Theorem:
(defthm xr-rvm32 (equal (xr fld index (mv-nth 2 (rvm32 addr x86))) (xr fld index x86)))
Theorem:
(defthm rvm32-xw-values (implies (not (equal fld :mem)) (and (equal (mv-nth 0 (rvm32 addr (xw fld index value x86))) (mv-nth 0 (rvm32 addr x86))) (equal (mv-nth 1 (rvm32 addr (xw fld index value x86))) (mv-nth 1 (rvm32 addr x86))))))