(rvm256 addr x86) → (mv * * x86)
Function:
(defun rvm256$inline (addr x86) (declare (xargs :stobjs (x86))) (declare (type (signed-byte 48) addr)) (if (mbt (canonical-address-p addr)) (let* ((16+addr (the (signed-byte 49) (+ 16 (the (signed-byte 48) addr)))) (31+addr (the (signed-byte 49) (+ 31 (the (signed-byte 48) addr))))) (if (mbe :logic (canonical-address-p 31+addr) :exec (< (the (signed-byte 49) 31+addr) 140737488355328)) (b* (((mv flg0 (the (unsigned-byte 128) oword0) x86) (rvm128 addr x86)) ((mv flg1 (the (unsigned-byte 128) oword1) x86) (rvm128 16+addr x86)) ((the (unsigned-byte 256) xword) (the (unsigned-byte 256) (logior (the (unsigned-byte 256) (ash oword1 128)) oword0)))) (mbe :logic (if (or flg0 flg1) (mv 'rvm256 0 x86) (mv nil xword x86)) :exec (mv nil xword x86))) (mv 'rvm256 0 x86))) (mv 'rvm256 0 x86)))
Theorem:
(defthm rvm256-no-error (implies (and (canonical-address-p addr) (canonical-address-p (+ 31 addr))) (equal (mv-nth 0 (rvm256 addr x86)) nil)))
Theorem:
(defthm n256p-mv-nth-1-rvm256 (unsigned-byte-p 256 (mv-nth 1 (rvm256 addr x86))) :rule-classes (:rewrite (:type-prescription :corollary (natp (mv-nth 1 (rvm256 addr x86))) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp)))) (:linear :corollary (and (<= 0 (mv-nth 1 (rvm256 addr x86))) (< (mv-nth 1 (rvm256 addr x86)) 115792089237316195423570985008687907853269984665640564039457584007913129639936)) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))
Theorem:
(defthm x86p-mv-nth-2-rvm256-unchanged (equal (mv-nth 2 (rvm256 addr x86)) x86))
Theorem:
(defthm xr-rvm256 (equal (xr fld index (mv-nth 2 (rvm256 addr x86))) (xr fld index x86)))
Theorem:
(defthm rvm256-xw-values (implies (not (equal fld :mem)) (and (equal (mv-nth 0 (rvm256 addr (xw fld index value x86))) (mv-nth 0 (rvm256 addr x86))) (equal (mv-nth 1 (rvm256 addr (xw fld index value x86))) (mv-nth 1 (rvm256 addr x86))))))