• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
        • Program-execution
        • Introduction
        • X86isa-build-instructions
        • Publications
        • Contributors
        • Machine
          • Syscalls
          • Cpuid
          • X86isa-state
          • Linear-memory
          • Rflag-specifications
          • Characterizing-undefined-behavior
          • Top-level-memory
          • App-view
            • Linear-memory-in-app-view
              • Rvm32
              • Rvm128
              • Canonical-address-p
                • Wvm32
                • Rvm80
                • Rvm64
                • Rvm48
                • Wvm80
                • Wvm64
                • Wvm48
                • Wvm128
                • Rvm16
                • Wvm16
                • Rvm08
                • Wvm08
            • X86-decoder
            • Physical-memory
            • Decoding-and-spec-utils
            • Instructions
            • X86-modes
            • Segmentation
            • Register-readers-and-writers
            • Other-non-deterministic-computations
            • Environment
            • Paging
          • Implemented-opcodes
          • Proof-utilities
          • To-do
          • Concrete-simulation-examples
          • Model-validation
          • Utils
          • Debugging-code-proofs
        • Execloader
        • Axe
      • Testing-utilities
      • Math
    • Linear-memory-in-app-view

    Canonical-address-p

    Recognizer of a canonical address

    Signature
    (canonical-address-p lin-addr) → *

    In 64-bit mode, a linear address is considered to be in canonical form if address bits 63 through to the most-significant implemented bit by the microarchitecture (represented by the constant *max-linear-address-size* in these books) are set to either all ones or all zeros.

    Definitions and Theorems

    Function: canonical-address-p$inline

    (defun canonical-address-p$inline (lin-addr)
           (declare (xargs :guard t))
           (mbe :logic (signed-byte-p 48 lin-addr)
                :exec (and (integerp lin-addr)
                           (<= -140737488355328 lin-addr)
                           (< lin-addr 140737488355328))))

    Theorem: canonical-address-p-and-logext-48

    (defthm canonical-address-p-and-logext-48
            (implies (canonical-address-p a)
                     (equal (logext 48 a) a)))

    Theorem: canonical-address-p-of-logext-48

    (defthm canonical-address-p-of-logext-48
            (canonical-address-p (logext 48 a)))