(wml48 lin-addr val x86) → (mv * x86)
Theorem:
(defthm wb-and-wvm48 (implies (and (app-view x86) (canonical-address-p lin-addr) (canonical-address-p (+ 5 lin-addr))) (equal (wvm48 lin-addr val x86) (wb 6 lin-addr :w val x86))))
Function:
(defun wml48 (lin-addr val x86) (declare (xargs :stobjs (x86))) (declare (type (signed-byte 48) lin-addr) (type (unsigned-byte 48) val)) (declare (xargs :guard (canonical-address-p lin-addr))) (let ((__function__ 'wml48)) (declare (ignorable __function__)) (if (mbt (canonical-address-p lin-addr)) (let* ((5+lin-addr (the (signed-byte 49) (+ 5 (the (signed-byte 48) lin-addr))))) (if (mbe :logic (canonical-address-p 5+lin-addr) :exec (< (the (signed-byte 49) 5+lin-addr) 140737488355328)) (mbe :logic (wb 6 lin-addr :w val x86) :exec (if (app-view x86) (wvm48 lin-addr val x86) (b* (((mv flag (the (unsigned-byte 52) p-addr0) x86) (la-to-pa lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 49) 1+lin-addr) (+ 1 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr1) x86) (la-to-pa 1+lin-addr :w x86)) ((when flag) (mv flag x86)) (2+lin-addr (the (signed-byte 50) (+ 2 (the (signed-byte 48) lin-addr)))) ((mv flag (the (unsigned-byte 52) p-addr2) x86) (la-to-pa 2+lin-addr :w x86)) ((when flag) (mv flag x86)) (3+lin-addr (the (signed-byte 51) (+ 3 (the (signed-byte 48) lin-addr)))) ((mv flag (the (unsigned-byte 52) p-addr3) x86) (la-to-pa 3+lin-addr :w x86)) ((when flag) (mv flag x86)) (4+lin-addr (the (signed-byte 52) (+ 4 (the (signed-byte 48) lin-addr)))) ((mv flag (the (unsigned-byte 52) p-addr4) x86) (la-to-pa 4+lin-addr :w x86)) ((when flag) (mv flag x86)) (5+lin-addr (the (signed-byte 53) (+ 5 (the (signed-byte 48) lin-addr)))) ((mv flag (the (unsigned-byte 52) p-addr5) x86) (la-to-pa 5+lin-addr :w x86)) ((when flag) (mv flag x86)) (byte0 (mbe :logic (part-select val :low 0 :width 8) :exec (the (unsigned-byte 8) (logand 255 val)))) (byte1 (mbe :logic (part-select val :low 8 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -8))))) (byte2 (mbe :logic (part-select val :low 16 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -16))))) (byte3 (mbe :logic (part-select val :low 24 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -24))))) (byte4 (mbe :logic (part-select val :low 32 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -32))))) (byte5 (mbe :logic (part-select val :low 40 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -40))))) (x86 (!memi p-addr0 byte0 x86)) (x86 (!memi p-addr1 byte1 x86)) (x86 (!memi p-addr2 byte2 x86)) (x86 (!memi p-addr3 byte3 x86)) (x86 (!memi p-addr4 byte4 x86)) (x86 (!memi p-addr5 byte5 x86))) (mv nil x86)))) (mv 'wml48 x86))) (mv 'wml48 x86))))
Theorem:
(defthm x86p-wml48 (implies (force (x86p x86)) (x86p (mv-nth 1 (wml48 lin-addr val x86)))) :rule-classes (:rewrite :type-prescription))