• 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
        • Implemented-opcodes
        • To-do
        • Proof-utilities
        • Peripherals
        • Model-validation
        • Modelcalls
        • Concrete-simulation-examples
        • Utils
          • Structures
            • Rflagsbits
            • Cr4bits
            • Xcr0bits
            • Cr0bits
              • Cr0bits-p
              • !cr0bits->res3
              • !cr0bits->res1
              • !cr0bits->res2
              • !cr0bits->nw
              • !cr0bits->wp
              • !cr0bits->ts
              • !cr0bits->pg
              • !cr0bits->pe
              • !cr0bits->ne
              • !cr0bits->mp
              • !cr0bits->et
              • !cr0bits->em
              • !cr0bits->cd
              • !cr0bits->am
              • Cr0bits->res3
                • Cr0bits->res2
                • Cr0bits->res1
                • Cr0bits-fix
                • Cr0bits->wp
                • Cr0bits->ts
                • Cr0bits->pg
                • Cr0bits->nw
                • Cr0bits->ne
                • Cr0bits->mp
                • Cr0bits->et
                • Cr0bits->em
                • Cr0bits->cd
                • Cr0bits->am
                • Cr0bits->pe
              • Prefixes
              • Ia32_eferbits
              • Evex-byte1
              • Cr3bits
              • Evex-byte3
              • Vex3-byte2
              • Vex3-byte1
              • Vex2-byte1
              • Evex-prefixes
              • Evex-byte2
              • Vex-prefixes
              • Sib
              • Modr/m-structures
              • Vex-prefixes-layout-structures
              • Sib-structures
              • Legacy-prefixes-layout-structure
              • Evex-prefixes-layout-structures
              • Cr8bits
              • Opcode-maps-structures
              • Segmentation-bitstructs
              • 8bits
              • 2bits
              • 4bits
              • 16bits
              • Paging-bitstructs
              • 3bits
              • 11bits
              • 40bits
              • 5bits
              • 32bits
              • 19bits
              • 10bits
              • 7bits
              • 64bits
              • 54bits
              • 45bits
              • 36bits
              • 31bits
              • 24bits
              • 22bits
              • 17bits
              • 13bits
              • 12bits
              • 6bits
              • Vex->x
              • Vex->b
              • Vex-prefixes-map-p
              • Vex-prefixes-byte0-p
              • Vex->w
              • Vex->vvvv
              • Vex->r
              • Fp-bitstructs
              • Cr4bits-debug
              • Vex->pp
              • Vex->l
              • Rflagsbits-debug
              • Evex->v-prime
              • Evex->z
              • Evex->w
              • Evex->vvvv
              • Evex->vl/rc
              • Evex->pp
              • Evex->aaa
              • Xcr0bits-debug
              • Vex3-byte1-equiv-under-mask
              • Vex3-byte2-equiv-under-mask
              • Vex2-byte1-equiv-under-mask
              • Vex-prefixes-equiv-under-mask
              • Rflagsbits-equiv-under-mask
              • Ia32_eferbits-equiv-under-mask
              • Evex-prefixes-equiv-under-mask
              • Evex-byte3-equiv-under-mask
              • Evex-byte2-equiv-under-mask
              • Evex-byte1-equiv-under-mask
              • Cr0bits-debug
              • Xcr0bits-equiv-under-mask
              • Sib-equiv-under-mask
              • Prefixes-equiv-under-mask
              • Cr8bits-equiv-under-mask
              • Cr4bits-equiv-under-mask
              • Cr3bits-equiv-under-mask
              • Cr0bits-equiv-under-mask
              • Vex3-byte1-debug
              • Prefixes-debug
              • Ia32_eferbits-debug
              • Evex-byte1-debug
              • Vex3-byte2-debug
              • Vex2-byte1-debug
              • Vex-prefixes-debug
              • Evex-prefixes-debug
              • Evex-byte3-debug
              • Evex-byte2-debug
              • Cr3bits-debug
              • Sib-debug
              • Cr8bits-debug
            • Utilities
          • Debugging-code-proofs
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Cr0bits

    Cr0bits->res3

    Access the |X86ISA|::|RES3| field of a cr0bits bit structure.

    Signature
    (cr0bits->res3 x) → res3
    Arguments
    x — Guard (cr0bits-p x).
    Returns
    res3 — Type (10bits-p res3).

    Definitions and Theorems

    Function: cr0bits->res3$inline

    (defun cr0bits->res3$inline (x)
      (declare (xargs :guard (cr0bits-p x)))
      (mbe :logic
           (let ((x (cr0bits-fix x)))
             (part-select x :low 19 :width 10))
           :exec (the (unsigned-byte 10)
                      (logand (the (unsigned-byte 10) 1023)
                              (the (unsigned-byte 13)
                                   (ash (the (unsigned-byte 32) x)
                                        -19))))))

    Theorem: 10bits-p-of-cr0bits->res3

    (defthm 10bits-p-of-cr0bits->res3
      (b* ((res3 (cr0bits->res3$inline x)))
        (10bits-p res3))
      :rule-classes :rewrite)

    Theorem: cr0bits->res3$inline-of-cr0bits-fix-x

    (defthm cr0bits->res3$inline-of-cr0bits-fix-x
      (equal (cr0bits->res3$inline (cr0bits-fix x))
             (cr0bits->res3$inline x)))

    Theorem: cr0bits->res3$inline-cr0bits-equiv-congruence-on-x

    (defthm cr0bits->res3$inline-cr0bits-equiv-congruence-on-x
      (implies (cr0bits-equiv x x-equiv)
               (equal (cr0bits->res3$inline x)
                      (cr0bits->res3$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: cr0bits->res3-of-cr0bits

    (defthm cr0bits->res3-of-cr0bits
     (equal
        (cr0bits->res3 (cr0bits pe mp em
                                ts et ne res1 wp res2 am res3 nw cd pg))
        (10bits-fix res3)))

    Theorem: cr0bits->res3-of-write-with-mask

    (defthm cr0bits->res3-of-write-with-mask
     (implies
      (and
        (fty::bitstruct-read-over-write-hyps x cr0bits-equiv-under-mask)
        (cr0bits-equiv-under-mask x y fty::mask)
        (equal (logand (lognot fty::mask) 536346624)
               0))
      (equal (cr0bits->res3 x)
             (cr0bits->res3 y))))