• 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
          • X86-decoder
          • Physical-memory
          • Decoding-and-spec-utils
          • Instructions
          • Register-readers-and-writers
            • Zmms-reads-and-writes
            • Gprs-reads-and-writes
              • Wr08
              • Wr16
              • Rr08
              • Wr32
              • !rgfi-size
              • Rgfi-size
                • Rr64
                • Wr64
                • Rr32
                • Rr16
              • 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
            • 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
    • Gprs-reads-and-writes

    Rgfi-size

    Read form byte, word, doubleword, or quadword general-purpose register

    Signature
    (rgfi-size nbytes index rex x86) → val
    Returns
    val — Type (natp val).

    Definitions and Theorems

    Function: rgfi-size$inline

    (defun rgfi-size$inline (nbytes index rex x86)
      (declare (xargs :stobjs (x86)))
      (declare (type (unsigned-byte 4) nbytes)
               (type (unsigned-byte 4) index)
               (type (unsigned-byte 8) rex))
      (declare (xargs :guard (and (reg-indexp index rex)
                                  (member nbytes '(1 2 4 8)))))
      (case nbytes
        (1 (rr08 index rex x86))
        (2 (rr16 index x86))
        (4 (rr32 index x86))
        (8 (rr64 index x86))
        (otherwise 0)))

    Theorem: natp-of-rgfi-size

    (defthm natp-of-rgfi-size
      (b* ((val (rgfi-size$inline nbytes index rex x86)))
        (natp val))
      :rule-classes :type-prescription)