(wml128 lin-addr val x86) → (mv * x86)
Theorem:
(defthm wb-and-wvm128 (implies (and (app-view x86) (canonical-address-p lin-addr) (canonical-address-p (+ 15 lin-addr))) (equal (wvm128 lin-addr val x86) (wb 16 lin-addr :w val x86))))
Function:
(defun wml128 (lin-addr val x86) (declare (xargs :stobjs (x86))) (declare (type (signed-byte 48) lin-addr) (type (unsigned-byte 128) val)) (declare (xargs :guard (canonical-address-p lin-addr))) (let ((__function__ 'wml128)) (declare (ignorable __function__)) (if (mbt (canonical-address-p lin-addr)) (let* ((15+lin-addr (the (signed-byte 49) (+ 15 (the (signed-byte 48) lin-addr))))) (if (mbe :logic (canonical-address-p 15+lin-addr) :exec (< (the (signed-byte 49) 15+lin-addr) 140737488355328)) (if (app-view x86) (mbe :logic (wb 16 lin-addr :w val x86) :exec (wvm128 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)) ((the (signed-byte 50) 2+lin-addr) (+ 2 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr2) x86) (la-to-pa 2+lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 51) 3+lin-addr) (+ 3 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr3) x86) (la-to-pa 3+lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 52) 4+lin-addr) (+ 4 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr4) x86) (la-to-pa 4+lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 53) 5+lin-addr) (+ 5 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr5) x86) (la-to-pa 5+lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 54) 6+lin-addr) (+ 6 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr6) x86) (la-to-pa 6+lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 55) 7+lin-addr) (+ 7 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr7) x86) (la-to-pa 7+lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 56) 8+lin-addr) (+ 8 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr8) x86) (la-to-pa 8+lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 57) 9+lin-addr) (+ 9 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr9) x86) (la-to-pa 9+lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 58) 10+lin-addr) (+ 10 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr10) x86) (la-to-pa 10+lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 59) 11+lin-addr) (+ 11 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr11) x86) (la-to-pa 11+lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 60) 12+lin-addr) (+ 12 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr12) x86) (la-to-pa 12+lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 61) 13+lin-addr) (+ 13 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr13) x86) (la-to-pa 13+lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 62) 14+lin-addr) (+ 14 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr14) x86) (la-to-pa 14+lin-addr :w x86)) ((when flag) (mv flag x86)) ((the (signed-byte 63) 15+lin-addr) (+ 15 lin-addr)) ((mv flag (the (unsigned-byte 52) p-addr15) x86) (la-to-pa 15+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))))) (byte6 (mbe :logic (part-select val :low 48 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -48))))) (byte7 (mbe :logic (part-select val :low 56 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -56))))) (byte8 (mbe :logic (part-select val :low 64 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -64))))) (byte9 (mbe :logic (part-select val :low 72 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -72))))) (byte10 (mbe :logic (part-select val :low 80 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -80))))) (byte11 (mbe :logic (part-select val :low 88 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -88))))) (byte12 (mbe :logic (part-select val :low 96 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -96))))) (byte13 (mbe :logic (part-select val :low 104 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -104))))) (byte14 (mbe :logic (part-select val :low 112 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -112))))) (byte15 (mbe :logic (part-select val :low 120 :width 8) :exec (the (unsigned-byte 8) (logand 255 (ash val -120))))) (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)) (x86 (!memi p-addr6 byte6 x86)) (x86 (!memi p-addr7 byte7 x86)) (x86 (!memi p-addr8 byte8 x86)) (x86 (!memi p-addr9 byte9 x86)) (x86 (!memi p-addr10 byte10 x86)) (x86 (!memi p-addr11 byte11 x86)) (x86 (!memi p-addr12 byte12 x86)) (x86 (!memi p-addr13 byte13 x86)) (x86 (!memi p-addr14 byte14 x86)) (x86 (!memi p-addr15 byte15 x86))) (mv nil x86))) (mv 'wml128 x86))) (mv 'wml128 x86))))
Theorem:
(defthm x86p-wml128 (implies (force (x86p x86)) (x86p (mv-nth 1 (wml128 lin-addr val x86)))) :rule-classes (:rewrite :type-prescription))