(wvm64 addr val x86) → (mv * x86)
Function:
(defun wvm64$inline (addr val x86) (declare (xargs :stobjs (x86))) (declare (type (signed-byte 48) addr) (type (unsigned-byte 64) val)) (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* ((dword0 (mbe :logic (part-select val :low 0 :width 32) :exec (logand 4294967295 val))) (dword1 (mbe :logic (part-select val :low 32 :width 32) :exec (logand 4294967295 (ash val -32)))) ((mv flg0 x86) (wvm32 addr dword0 x86)) ((mv flg1 x86) (wvm32 4+addr dword1 x86))) (mbe :logic (if (or flg0 flg1) (mv 'wvm64 x86) (mv nil x86)) :exec (mv nil x86))) (mv 'wvm64 x86))) (mv 'wvm64 x86)))
Theorem:
(defthm wvm64-no-error (implies (and (canonical-address-p addr) (canonical-address-p (+ 7 addr))) (equal (mv-nth 0 (wvm64 addr val x86)) nil)))
Theorem:
(defthm x86p-mv-nth-1-wvm64 (implies (x86p x86) (x86p (mv-nth 1 (wvm64 addr val x86)))) :rule-classes (:type-prescription :rewrite))
Theorem:
(defthm xr-wmv64-app-view (implies (not (equal fld :mem)) (equal (xr fld index (mv-nth 1 (wvm64 addr val x86))) (xr fld index x86))))
Theorem:
(defthm wvm64-xw-app-view (implies (not (equal fld :mem)) (and (equal (mv-nth 0 (wvm64 addr val (xw fld index value x86))) (mv-nth 0 (wvm64 addr val x86))) (equal (mv-nth 1 (wvm64 addr val (xw fld index value x86))) (xw fld index value (mv-nth 1 (wvm64 addr val x86)))))))