• 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
        • Running-linux
        • Introduction
        • Asmtest
        • X86isa-build-instructions
        • Publications
        • Contributors
        • Machine
          • X86isa-state
          • Syscalls
          • Cpuid
          • Linear-memory
          • Rflag-specifications
          • Characterizing-undefined-behavior
          • App-view
          • Top-level-memory
          • X86-decoder
          • Physical-memory
          • Decoding-and-spec-utils
          • Instructions
          • Register-readers-and-writers
            • Zmms-reads-and-writes
            • Gprs-reads-and-writes
            • Mmx-registers-reads-and-writes
            • Xmms-reads-and-writes
            • Rflags-reads-and-writes
            • Gpr-indices
            • Vex-vvvv-reg-index
            • Msr-reads-and-writes
            • Ctr-reads-and-writes
              • !ctri-write
              • !msra
              • Msra
          • 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
  • Register-readers-and-writers

Ctr-reads-and-writes

Functions to read/write into the control registers

Definitions and Theorems

Function: !ctri-write

(defun !ctri-write (ctr-index val x86)
  (declare (xargs :stobjs (x86)))
  (declare (xargs :guard (and (natp ctr-index) (n64p val))))
  (declare (xargs :guard (< ctr-index 17)))
  (let ((__function__ '!ctri-write))
    (declare (ignorable __function__))
    (b* ((val-write (case ctr-index
                      (*cr0* (loghead 32 val))
                      (*cr4* (logapp 21 val (ctri *cr4* x86)))
                      (otherwise val)))
         (x86 (!ctri ctr-index val-write x86)))
      x86)))

Theorem: x86p-of-!ctri-write

(defthm x86p-of-!ctri-write
  (implies (x86p x86)
           (b* ((x86 (!ctri-write ctr-index val x86)))
             (x86p x86)))
  :rule-classes :rewrite)

Subtopics

!ctri-write
!msra
Msra