(write-to-physical-memory p-addrs value x86) → x86
Function:
(defun write-to-physical-memory (p-addrs value x86) (declare (xargs :stobjs (x86))) (declare (xargs :guard (and (physical-address-listp p-addrs) (natp value)))) (declare (xargs :guard (not (app-view x86)))) (let ((__function__ 'write-to-physical-memory)) (declare (ignorable __function__)) (if (endp p-addrs) x86 (b* ((addr0 (car p-addrs)) (byte0 (loghead 8 value)) (x86 (!memi addr0 byte0 x86))) (write-to-physical-memory (cdr p-addrs) (logtail 8 value) x86)))))
Theorem:
(defthm x86p-write-to-physical-memory (implies (and (x86p x86) (physical-address-listp p-addrs)) (x86p (write-to-physical-memory p-addrs value x86))))
Theorem:
(defthm xr-not-mem-write-to-physical-memory (implies (not (equal fld :mem)) (equal (xr fld index (write-to-physical-memory p-addrs bytes x86)) (xr fld index x86))))
Theorem:
(defthm write-to-physical-memory-xw-in-sys-view (implies (not (equal fld :mem)) (equal (write-to-physical-memory p-addrs bytes (xw fld index value x86)) (xw fld index value (write-to-physical-memory p-addrs bytes x86)))))
Theorem:
(defthm 64-bit-modep-of-write-to-physical-memory (equal (64-bit-modep (write-to-physical-memory p-addrs value x86)) (64-bit-modep x86)))
Theorem:
(defthm x86-operation-mode-of-write-to-physical-memory (equal (x86-operation-mode (write-to-physical-memory p-addrs value x86)) (x86-operation-mode x86)))