(wvm80 addr val x86) → (mv * x86)
Function:
(defun wvm80$inline (addr val x86) (declare (xargs :stobjs (x86))) (declare (type (signed-byte 48) addr) (type (unsigned-byte 80) val)) (if (mbt (canonical-address-p addr)) (let* ((2+addr (the (signed-byte 49) (+ 2 (the (signed-byte 48) addr)))) (9+addr (the (signed-byte 49) (+ 9 (the (signed-byte 48) addr))))) (if (mbe :logic (canonical-address-p 9+addr) :exec (< (the (signed-byte 49) 9+addr) 140737488355328)) (b* ((word0 (mbe :logic (part-select val :low 0 :width 16) :exec (logand 65535 val))) (qword1 (mbe :logic (part-select val :low 16 :width 64) :exec (logand 18446744073709551615 (ash val -16)))) ((mv flg0 x86) (wvm16 addr word0 x86)) ((mv flg1 x86) (wvm64 2+addr qword1 x86))) (mbe :logic (if (or flg0 flg1) (mv 'wvm80 x86) (mv nil x86)) :exec (mv nil x86))) (mv 'wvm80 x86))) (mv 'wvm80 x86)))
Theorem:
(defthm wvm80-no-error (implies (and (canonical-address-p addr) (canonical-address-p (+ 9 addr))) (equal (mv-nth 0 (wvm80 addr val x86)) nil)))
Theorem:
(defthm x86p-mv-nth-1-wvm80 (implies (x86p x86) (x86p (mv-nth 1 (wvm80 addr val x86)))) :rule-classes (:type-prescription :rewrite))
Theorem:
(defthm xr-wmv80-app-view (implies (not (equal fld :mem)) (equal (xr fld index (mv-nth 1 (wvm80 addr val x86))) (xr fld index x86))))
Theorem:
(defthm wvm80-xw-app-view (implies (not (equal fld :mem)) (and (equal (mv-nth 0 (wvm80 addr val (xw fld index value x86))) (mv-nth 0 (wvm80 addr val x86))) (equal (mv-nth 1 (wvm80 addr val (xw fld index value x86))) (xw fld index value (mv-nth 1 (wvm80 addr val x86)))))))