• 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->et

    Update the |X86ISA|::|ET| field of a cr0bits bit structure.

    Signature
    (!cr0bits->et et x) → new-x
    Arguments
    et — Guard (bitp et).
    x — Guard (cr0bits-p x).
    Returns
    new-x — Type (cr0bits-p new-x).

    Definitions and Theorems

    Function: !cr0bits->et$inline

    (defun !cr0bits->et$inline (et x)
     (declare (xargs :guard (and (bitp et) (cr0bits-p x))))
     (mbe
         :logic
         (b* ((et (mbe :logic (bfix et) :exec et))
              (x (cr0bits-fix x)))
           (part-install et x :width 1 :low 4))
         :exec (the (unsigned-byte 32)
                    (logior (the (unsigned-byte 32)
                                 (logand (the (unsigned-byte 32) x)
                                         (the (signed-byte 6) -17)))
                            (the (unsigned-byte 5)
                                 (ash (the (unsigned-byte 1) et) 4))))))

    Theorem: cr0bits-p-of-!cr0bits->et

    (defthm cr0bits-p-of-!cr0bits->et
      (b* ((new-x (!cr0bits->et$inline et x)))
        (cr0bits-p new-x))
      :rule-classes :rewrite)

    Theorem: !cr0bits->et$inline-of-bfix-et

    (defthm !cr0bits->et$inline-of-bfix-et
      (equal (!cr0bits->et$inline (bfix et) x)
             (!cr0bits->et$inline et x)))

    Theorem: !cr0bits->et$inline-bit-equiv-congruence-on-et

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

    Theorem: !cr0bits->et$inline-of-cr0bits-fix-x

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

    Theorem: !cr0bits->et$inline-cr0bits-equiv-congruence-on-x

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

    Theorem: !cr0bits->et-is-cr0bits

    (defthm !cr0bits->et-is-cr0bits
      (equal (!cr0bits->et et x)
             (change-cr0bits x :et et)))

    Theorem: cr0bits->et-of-!cr0bits->et

    (defthm cr0bits->et-of-!cr0bits->et
      (b* ((?new-x (!cr0bits->et$inline et x)))
        (equal (cr0bits->et new-x) (bfix et))))

    Theorem: !cr0bits->et-equiv-under-mask

    (defthm !cr0bits->et-equiv-under-mask
      (b* ((?new-x (!cr0bits->et$inline et x)))
        (cr0bits-equiv-under-mask new-x x -17)))