(rvm64 addr x86) → (mv * * x86)
Function:
(defun rvm64$inline (addr x86) (declare (xargs :stobjs (x86))) (declare (type (signed-byte 48) addr)) (if (mbt (canonical-address-p addr)) (let* ((4+addr (the (signed-byte 49) (+ 4 (the (signed-byte 48) addr)))) (7+addr (the (signed-byte 49) (+ 7 (the (signed-byte 48) addr))))) (if (mbe :logic (canonical-address-p 7+addr) :exec (< (the (signed-byte 49) 7+addr) 140737488355328)) (b* (((mv flg0 (the (unsigned-byte 32) dword0) x86) (rvm32 addr x86)) ((mv flg1 (the (unsigned-byte 32) dword1) x86) (rvm32 4+addr x86)) ((the (unsigned-byte 64) qword) (the (unsigned-byte 64) (logior (the (unsigned-byte 64) (ash dword1 32)) dword0)))) (mbe :logic (if (or flg0 flg1) (mv 'rvm64 0 x86) (mv nil qword x86)) :exec (mv nil qword x86))) (mv 'rvm64 0 x86))) (mv 'rvm64 0 x86)))
Theorem:
(defthm rvm64-no-error (implies (and (canonical-address-p addr) (canonical-address-p (+ 7 addr))) (equal (mv-nth 0 (rvm64 addr x86)) nil)))
Theorem:
(defthm n64p-mv-nth-1-rvm64 (unsigned-byte-p 64 (mv-nth 1 (rvm64 addr x86))) :rule-classes (:rewrite (:type-prescription :corollary (natp (mv-nth 1 (rvm64 addr x86))) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp)))) (:linear :corollary (and (<= 0 (mv-nth 1 (rvm64 addr x86))) (< (mv-nth 1 (rvm64 addr x86)) 18446744073709551616)) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))
Theorem:
(defthm x86p-mv-nth-2-rvm64-unchanged (equal (mv-nth 2 (rvm64 addr x86)) x86))
Theorem:
(defthm xr-rvm64 (equal (xr fld index (mv-nth 2 (rvm64 addr x86))) (xr fld index x86)))
Theorem:
(defthm rvm64-xw-values (implies (not (equal fld :mem)) (and (equal (mv-nth 0 (rvm64 addr (xw fld index value x86))) (mv-nth 0 (rvm64 addr x86))) (equal (mv-nth 1 (rvm64 addr (xw fld index value x86))) (mv-nth 1 (rvm64 addr x86))))))