• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
        • Program-execution
        • Introduction
        • X86isa-build-instructions
        • Publications
        • Contributors
        • Machine
          • Syscalls
          • Cpuid
          • X86isa-state
          • Linear-memory
          • Rflag-specifications
          • Characterizing-undefined-behavior
          • Top-level-memory
          • App-view
          • X86-decoder
          • Physical-memory
          • Decoding-and-spec-utils
          • Instructions
            • Two-byte-opcodes
            • One-byte-opcodes
            • Fp-opcodes
            • Instruction-semantic-functions
            • Opcode-maps
              • Cpuid
              • Create-inst-doc
              • Opcode-maps-structures
              • Implemented-opcodes
              • Create-insts-doc
              • Create-insts-doc-aux
              • Chk-exc-fn
              • Gen-operand-type-code-doc
              • Gen-addressing-method-code-doc
              • Create-arg-doc
              • Create-extra-info-doc
              • Create-extra-info-doc-string
              • Create-args-doc
              • Symbol-list-to-string
              • Get-operand-type-code-doc
              • Get-addressing-method-doc
              • Filtering-instructions
              • Addressing-method-code-p
              • Operand-type-code-p
                • Eval-pre-map
              • X86-illegal-instruction
              • Implemented-opcodes
              • X86-general-protection
              • X86-device-not-available
              • X86-step-unimplemented
              • Privileged-opcodes
            • X86-modes
            • Segmentation
            • Register-readers-and-writers
            • Other-non-deterministic-computations
            • Environment
            • Paging
          • Implemented-opcodes
          • Proof-utilities
          • To-do
          • Concrete-simulation-examples
          • Model-validation
          • Utils
          • Debugging-code-proofs
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Opcode-maps

    Operand-type-code-p

    Codes for Operand Type; See Intel Vol. 2, Appendix A.2.2

    This is an ordinary defenum.

    Function: operand-type-code-p

    (defun operand-type-code-p (x)
      (declare (xargs :guard t))
      (or (eq x 'a)
          (eq x 'b)
          (eq x 'c)
          (eq x 'd)
          (eq x 'dq)
          (eq x 'p)
          (eq x 'pd)
          (eq x 'pi)
          (eq x 'ps)
          (eq x 'q)
          (eq x 'qq)
          (eq x 's)
          (eq x 'sd)
          (eq x 'ss)
          (eq x 'si)
          (eq x 'v)
          (eq x 'w)
          (eq x 'x)
          (eq x 'y)
          (eq x 'z)))

    Theorem: type-when-operand-type-code-p

    (defthm type-when-operand-type-code-p
      (implies (operand-type-code-p x)
               (if (symbolp x)
                   (if (not (equal x 't))
                       (not (equal x 'nil))
                     'nil)
                 'nil))
      :rule-classes :compound-recognizer)