• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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

    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)))