(wvm512 addr val x86) → (mv * x86)
Function:
(defun wvm512$inline (addr val x86) (declare (xargs :stobjs (x86))) (declare (type (signed-byte 48) addr) (type (unsigned-byte 512) val)) (if (mbt (canonical-address-p addr)) (let* ((32+addr (the (signed-byte 49) (+ 32 (the (signed-byte 48) addr)))) (63+addr (the (signed-byte 49) (+ 63 (the (signed-byte 48) addr))))) (if (mbe :logic (canonical-address-p 63+addr) :exec (< (the (signed-byte 49) 63+addr) 140737488355328)) (b* ((oword0 (mbe :logic (part-select val :low 0 :width 256) :exec (logand 115792089237316195423570985008687907853269984665640564039457584007913129639935 val))) (oword1 (mbe :logic (part-select val :low 256 :width 256) :exec (logand 115792089237316195423570985008687907853269984665640564039457584007913129639935 (ash val -256)))) ((mv flg0 x86) (wvm256 addr oword0 x86)) ((mv flg1 x86) (wvm256 32+addr oword1 x86))) (mbe :logic (if (or flg0 flg1) (mv 'wvm512 x86) (mv nil x86)) :exec (mv nil x86))) (mv 'wvm512 x86))) (mv 'wvm512 x86)))
Theorem:
(defthm wvm512-no-error (implies (and (canonical-address-p addr) (canonical-address-p (+ 63 addr))) (equal (mv-nth 0 (wvm512 addr val x86)) nil)))
Theorem:
(defthm x86p-mv-nth-1-wvm512 (implies (x86p x86) (x86p (mv-nth 1 (wvm512 addr val x86)))) :rule-classes (:type-prescription :rewrite))
Theorem:
(defthm xr-wmv512-app-view (implies (not (equal fld :mem)) (equal (xr fld index (mv-nth 1 (wvm512 addr val x86))) (xr fld index x86))))
Theorem:
(defthm wvm512-xw-app-view (implies (not (equal fld :mem)) (and (equal (mv-nth 0 (wvm512 addr val (xw fld index value x86))) (mv-nth 0 (wvm512 addr val x86))) (equal (mv-nth 1 (wvm512 addr val (xw fld index value x86))) (xw fld index value (mv-nth 1 (wvm512 addr val x86)))))))