(wvm32 addr val x86) → (mv * x86)
Function:
(defun wvm32$inline (addr val x86) (declare (xargs :stobjs (x86))) (declare (type (signed-byte 48) addr) (type (unsigned-byte 32) val)) (if (mbt (canonical-address-p addr)) (let* ((1+addr (the (signed-byte 49) (+ 1 (the (signed-byte 48) addr)))) (2+addr (the (signed-byte 49) (+ 2 (the (signed-byte 48) addr)))) (3+addr (the (signed-byte 49) (+ 3 (the (signed-byte 48) addr))))) (if (mbe :logic (canonical-address-p 3+addr) :exec (< (the (signed-byte 49) 3+addr) 140737488355328)) (b* (((the (unsigned-byte 8) byte0) (mbe :logic (part-select val :low 0 :width 8) :exec (logand 255 val))) ((the (unsigned-byte 8) byte1) (mbe :logic (part-select val :low 8 :width 8) :exec (logand 255 (ash val -8)))) ((the (unsigned-byte 8) byte2) (mbe :logic (part-select val :low 16 :width 8) :exec (logand 255 (ash val -16)))) ((the (unsigned-byte 8) byte3) (mbe :logic (part-select val :low 24 :width 8) :exec (logand 255 (ash val -24)))) (x86 (!memi (n48 addr) byte0 x86)) (x86 (!memi (n48 1+addr) byte1 x86)) (x86 (!memi (n48 2+addr) byte2 x86)) (x86 (!memi (n48 3+addr) byte3 x86))) (mv nil x86)) (mv 'wvm32 x86))) (mv 'wvm32 x86)))
Theorem:
(defthm wvm32-no-error (implies (and (canonical-address-p addr) (canonical-address-p (+ 3 addr))) (equal (mv-nth 0 (wvm32 addr val x86)) nil)))
Theorem:
(defthm x86p-mv-nth-1-wvm32 (implies (x86p x86) (x86p (mv-nth 1 (wvm32 addr val x86)))) :rule-classes (:rewrite :type-prescription))
Theorem:
(defthm xr-wmv32-app-view (implies (not (equal fld :mem)) (equal (xr fld index (mv-nth 1 (wvm32 addr val x86))) (xr fld index x86))))
Theorem:
(defthm wvm32-xw-app-view (implies (not (equal fld :mem)) (and (equal (mv-nth 0 (wvm32 addr val (xw fld index value x86))) (mv-nth 0 (wvm32 addr val x86))) (equal (mv-nth 1 (wvm32 addr val (xw fld index value x86))) (xw fld index value (mv-nth 1 (wvm32 addr val x86)))))))