(wml08 lin-addr val x86) → (mv * x86)
Function:
(defun wml08 (lin-addr val x86) (declare (xargs :stobjs (x86))) (declare (type (signed-byte 48) lin-addr) (type (unsigned-byte 8) val)) (declare (xargs :guard (canonical-address-p lin-addr))) (let ((__function__ 'wml08)) (declare (ignorable __function__)) (mbe :logic (wb 1 lin-addr :w val x86) :exec (if (app-view x86) (wvm08 lin-addr val x86) (b* (((mv flag (the (unsigned-byte 52) p-addr) x86) (la-to-pa lin-addr :w x86)) ((when flag) (mv flag x86)) (byte (mbe :logic (n08 val) :exec val)) (x86 (!memi p-addr byte x86))) (mv nil x86))))))
Theorem:
(defthm x86p-wml08 (implies (force (x86p x86)) (x86p (mv-nth 1 (wml08 lin-addr val x86)))) :rule-classes (:rewrite :type-prescription))
Theorem:
(defthm app-view-wml08-no-error (implies (and (app-view x86) (canonical-address-p addr)) (equal (mv-nth 0 (wml08 addr val x86)) nil)))
Theorem:
(defthm xr-wml08-app-view (implies (and (app-view x86) (not (equal fld :mem))) (equal (xr fld index (mv-nth 1 (wml08 addr val x86))) (xr fld index x86))))
Theorem:
(defthm xr-wml08-sys-view (implies (and (not (app-view x86)) (not (equal fld :tlb)) (not (equal fld :mem)) (not (equal fld :fault))) (equal (xr fld index (mv-nth 1 (wml08 addr val x86))) (xr fld index x86))))
Theorem:
(defthm wml08-xw-app-view (implies (and (app-view x86) (not (equal fld :mem)) (not (equal fld :app-view))) (and (equal (mv-nth 0 (wml08 addr val (xw fld index value x86))) (mv-nth 0 (wml08 addr val x86))) (equal (mv-nth 1 (wml08 addr val (xw fld index value x86))) (xw fld index value (mv-nth 1 (wml08 addr val x86)))))))
Theorem:
(defthm wml08-xw-system-mode (implies (and (not (app-view x86)) (not (equal fld :tlb)) (not (equal fld :fault)) (not (equal fld :seg-visible)) (not (equal fld :mem)) (not (equal fld :ctr)) (not (equal fld :rflags)) (not (equal fld :msr)) (not (equal fld :app-view)) (not (equal fld :marking-view)) (not (equal fld :implicit-supervisor-access))) (and (equal (mv-nth 0 (wml08 addr val (xw fld index value x86))) (mv-nth 0 (wml08 addr val x86))) (equal (mv-nth 1 (wml08 addr val (xw fld index value x86))) (xw fld index value (mv-nth 1 (wml08 addr val x86)))))))
Theorem:
(defthm wml08-xw-system-mode-rflags-not-ac (implies (and (not (app-view x86)) (equal (rflagsbits->ac value) (rflagsbits->ac (rflags x86)))) (and (equal (mv-nth 0 (wml08 addr val (xw :rflags nil value x86))) (mv-nth 0 (wml08 addr val x86))) (equal (mv-nth 1 (wml08 addr val (xw :rflags nil value x86))) (xw :rflags nil value (mv-nth 1 (wml08 addr val x86)))))))