• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
        • Program-execution
        • Sdm-instruction-set-summary
        • Tlb
        • Running-linux
        • Introduction
        • Asmtest
        • X86isa-build-instructions
        • Publications
        • Contributors
        • Machine
          • X86isa-state
          • Syscalls
          • Cpuid
          • Linear-memory
          • Rflag-specifications
          • Characterizing-undefined-behavior
          • Top-level-memory
          • App-view
          • X86-decoder
          • Physical-memory
            • Addr-range
            • Read-from-physical-memory
            • Write-to-physical-memory
            • Rm-low-32
            • Wm-low-32
              • Rm-low-64
              • Create-physical-address-list
              • Wm-low-64
              • Physical-address-listp
              • Physical-address-p
            • Decoding-and-spec-utils
            • Instructions
            • Register-readers-and-writers
            • X86-modes
            • Segmentation
            • Other-non-deterministic-computations
            • Environment
            • Paging
          • Implemented-opcodes
          • To-do
          • Proof-utilities
          • Peripherals
          • Model-validation
          • Modelcalls
          • Concrete-simulation-examples
          • Utils
          • Debugging-code-proofs
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Physical-memory

    Wm-low-32

    Signature
    (wm-low-32 addr val x86) → x86

    Definitions and Theorems

    Function: wm-low-32$inline

    (defun wm-low-32$inline (addr val x86)
      (declare (xargs :stobjs (x86)))
      (declare (type (unsigned-byte 52) addr)
               (type (unsigned-byte 32) val))
      (declare (xargs :guard (and (not (app-view x86))
                                  (< (+ 3 addr) *mem-size-in-bytes*))))
      (if (mbt (not (app-view x86)))
          (let ((addr (mbe :logic (ifix addr) :exec addr)))
            (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 addr byte0 x86))
                 (x86 (!memi (+ 1 addr) byte1 x86))
                 (x86 (!memi (+ 2 addr) byte2 x86))
                 (x86 (!memi (+ 3 addr) byte3 x86)))
              x86))
        x86))

    Theorem: x86p-wm-low-32

    (defthm x86p-wm-low-32
      (implies (x86p x86)
               (x86p (wm-low-32 addr val x86)))
      :rule-classes (:rewrite :type-prescription))

    Theorem: xr-wm-low-32

    (defthm xr-wm-low-32
      (implies (not (equal fld :mem))
               (equal (xr fld index (wm-low-32 addr val x86))
                      (xr fld index x86))))

    Theorem: wm-low-32-xw

    (defthm wm-low-32-xw
      (implies (and (not (equal fld :mem))
                    (not (equal fld :app-view)))
               (equal (wm-low-32 addr val (xw fld index value x86))
                      (xw fld
                          index value (wm-low-32 addr val x86)))))