• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
        • Program-execution
        • Sdm-instruction-set-summary
        • Tlb
          • Tlb-key
            • !tlb-key->implicit-supervisor-access
            • Tlb-key-fast
            • Tlb-key-p
            • !tlb-key->r-w-x
            • !tlb-key->vpn
            • !tlb-key->smep
            • !tlb-key->smap
              • !tlb-key->cpl
              • !tlb-key->nxe
              • Tlb-key->implicit-supervisor-access
              • !tlb-key->wp
              • !tlb-key->ac
              • Tlb-key->vpn
              • Tlb-key->smep
              • Tlb-key->smap
              • Tlb-key->r-w-x
              • Tlb-key->cpl
              • Tlb-key-fix
              • Tlb-key->wp
              • Tlb-key->nxe
              • Tlb-key->ac
              • Good-tlb-key-p
            • Tlbp
            • Tlb-entryp
          • Running-linux
          • Introduction
          • Asmtest
          • X86isa-build-instructions
          • Publications
          • Contributors
          • Machine
          • Implemented-opcodes
          • To-do
          • Proof-utilities
          • Peripherals
          • Model-validation
          • Modelcalls
          • Concrete-simulation-examples
          • Utils
          • Debugging-code-proofs
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Tlb-key

    !tlb-key->smap

    Update the |X86ISA|::|SMAP| field of a tlb-key bit structure.

    Signature
    (!tlb-key->smap smap x) → new-x
    Arguments
    smap — Guard (bitp smap).
    x — Guard (tlb-key-p x).
    Returns
    new-x — Type (tlb-key-p new-x).

    Definitions and Theorems

    Function: !tlb-key->smap$inline

    (defun !tlb-key->smap$inline (smap x)
      (declare (xargs :guard (and (bitp smap) (tlb-key-p x))))
      (mbe :logic
           (b* ((smap (mbe :logic (bfix smap) :exec smap))
                (x (tlb-key-fix x)))
             (part-install smap x :width 1 :low 2))
           :exec (the (unsigned-byte 46)
                      (logior (the (unsigned-byte 46)
                                   (logand (the (unsigned-byte 46) x)
                                           (the (signed-byte 4) -5)))
                              (the (unsigned-byte 3)
                                   (ash (the (unsigned-byte 1) smap)
                                        2))))))

    Theorem: tlb-key-p-of-!tlb-key->smap

    (defthm tlb-key-p-of-!tlb-key->smap
      (b* ((new-x (!tlb-key->smap$inline smap x)))
        (tlb-key-p new-x))
      :rule-classes :rewrite)

    Theorem: !tlb-key->smap$inline-of-bfix-smap

    (defthm !tlb-key->smap$inline-of-bfix-smap
      (equal (!tlb-key->smap$inline (bfix smap) x)
             (!tlb-key->smap$inline smap x)))

    Theorem: !tlb-key->smap$inline-bit-equiv-congruence-on-smap

    (defthm !tlb-key->smap$inline-bit-equiv-congruence-on-smap
      (implies (bit-equiv smap smap-equiv)
               (equal (!tlb-key->smap$inline smap x)
                      (!tlb-key->smap$inline smap-equiv x)))
      :rule-classes :congruence)

    Theorem: !tlb-key->smap$inline-of-tlb-key-fix-x

    (defthm !tlb-key->smap$inline-of-tlb-key-fix-x
      (equal (!tlb-key->smap$inline smap (tlb-key-fix x))
             (!tlb-key->smap$inline smap x)))

    Theorem: !tlb-key->smap$inline-tlb-key-equiv-congruence-on-x

    (defthm !tlb-key->smap$inline-tlb-key-equiv-congruence-on-x
      (implies (tlb-key-equiv x x-equiv)
               (equal (!tlb-key->smap$inline smap x)
                      (!tlb-key->smap$inline smap x-equiv)))
      :rule-classes :congruence)

    Theorem: !tlb-key->smap-is-tlb-key

    (defthm !tlb-key->smap-is-tlb-key
      (equal (!tlb-key->smap smap x)
             (change-tlb-key x :smap smap)))

    Theorem: tlb-key->smap-of-!tlb-key->smap

    (defthm tlb-key->smap-of-!tlb-key->smap
      (b* ((?new-x (!tlb-key->smap$inline smap x)))
        (equal (tlb-key->smap new-x)
               (bfix smap))))

    Theorem: !tlb-key->smap-equiv-under-mask

    (defthm !tlb-key->smap-equiv-under-mask
      (b* ((?new-x (!tlb-key->smap$inline smap x)))
        (tlb-key-equiv-under-mask new-x x -5)))