• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • 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
            • Linear-memory-in-app-view
              • Canonical-address-p
              • Rvm512
              • Rvm32
              • Rvm256
              • Wvm32
              • Rvm128
              • Rvm80
              • Rvm64
              • Rvm48
              • Wvm512
              • Wvm64
              • Wvm48
              • Wvm256
              • Wvm128
                • Rvm16
                • Wvm80
                • Wvm16
                • Rvm08
                • Wvm08
            • X86-decoder
            • Physical-memory
            • 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
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Linear-memory-in-app-view

    Wvm128

    Signature
    (wvm128 addr val x86) → (mv * x86)

    Definitions and Theorems

    Function: wvm128$inline

    (defun wvm128$inline (addr val x86)
     (declare (xargs :stobjs (x86)))
     (declare (type (signed-byte 48) addr)
              (type (unsigned-byte 128) val))
     (if
      (mbt (canonical-address-p addr))
      (let* ((8+addr (the (signed-byte 49)
                          (+ 8 (the (signed-byte 48) addr))))
             (15+addr (the (signed-byte 49)
                           (+ 15 (the (signed-byte 48) addr)))))
        (if
         (mbe :logic (canonical-address-p 15+addr)
              :exec (< (the (signed-byte 49) 15+addr)
                       140737488355328))
         (b*
          ((qword0 (mbe :logic (part-select val :low 0 :width 64)
                        :exec (logand 18446744073709551615 val)))
           (qword1
                (mbe :logic (part-select val :low 64 :width 64)
                     :exec (logand 18446744073709551615 (ash val -64))))
           ((mv flg0 x86) (wvm64 addr qword0 x86))
           ((mv flg1 x86)
            (wvm64 8+addr qword1 x86)))
          (mbe :logic
               (if (or flg0 flg1)
                   (mv 'wvm128 x86)
                 (mv nil x86))
               :exec (mv nil x86)))
         (mv 'wvm128 x86)))
      (mv 'wvm128 x86)))

    Theorem: wvm128-no-error

    (defthm wvm128-no-error
      (implies (and (canonical-address-p addr)
                    (canonical-address-p (+ 15 addr)))
               (equal (mv-nth 0 (wvm128 addr val x86))
                      nil)))

    Theorem: x86p-mv-nth-1-wvm128

    (defthm x86p-mv-nth-1-wvm128
      (implies (x86p x86)
               (x86p (mv-nth 1 (wvm128 addr val x86))))
      :rule-classes (:type-prescription :rewrite))

    Theorem: xr-wmv128-app-view

    (defthm xr-wmv128-app-view
      (implies (not (equal fld :mem))
               (equal (xr fld
                          index (mv-nth 1 (wvm128 addr val x86)))
                      (xr fld index x86))))

    Theorem: wvm128-xw-app-view

    (defthm wvm128-xw-app-view
     (implies
         (not (equal fld :mem))
         (and (equal (mv-nth 0
                             (wvm128 addr val (xw fld index value x86)))
                     (mv-nth 0 (wvm128 addr val x86)))
              (equal (mv-nth 1
                             (wvm128 addr val (xw fld index value x86)))
                     (xw fld index value
                         (mv-nth 1 (wvm128 addr val x86)))))))