• 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
            • Read-operands-and-write-results
            • Effective-address-computations
            • Select-operand-size
            • Instruction-pointer-operations
            • Stack-pointer-operations
            • Select-segment-register
            • Prefix-modrm-sib-decoding
              • Modr/m-decoding
              • Mandatory-prefixes-computation
              • Modr/m-detection
              • Legacy-prefixes-decoding
              • Compute-mandatory-prefix-for-three-byte-opcode
                • 64-bit-compute-mandatory-prefix-for-0f-3a-three-byte-opcode
                • 64-bit-compute-mandatory-prefix-for-0f-38-three-byte-opcode
                • 32-bit-compute-mandatory-prefix-for-0f-3a-three-byte-opcode
                • 32-bit-compute-mandatory-prefix-for-0f-38-three-byte-opcode
                • 64-bit-compute-mandatory-prefix-for-two-byte-opcode
                • 32-bit-compute-mandatory-prefix-for-two-byte-opcode
                • Instructions-with-mandatory-prefixes
                • Compute-mandatory-prefix-for-0f-3a-three-byte-opcode
                • Compute-mandatory-prefix-for-0f-38-three-byte-opcode
                • Compute-mandatory-prefix-for-two-byte-opcode
              • Select-address-size
              • Rex-byte-from-vex-prefixes
              • Check-instruction-length
              • Error-objects
              • Rip-guard-okp
              • Sib-decoding
            • Instructions
            • Register-readers-and-writers
            • 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
    • Prefix-modrm-sib-decoding

    Compute-mandatory-prefix-for-three-byte-opcode

    Three-byte opcodes: picks the appropriate SIMD prefix as the mandatory prefix, if applicable

    Signature
    (compute-mandatory-prefix-for-three-byte-opcode 
         proc-mode 
         second-escape-byte opcode prefixes) 
     
      → 
    mandatory-prefix
    Arguments
    second-escape-byte — Second byte of the three-byte opcode; either 0x38 or 0x3A.
    opcode — Third byte of the three-byte opcode.
    Returns
    mandatory-prefix — Type (unsigned-byte-p 8 mandatory-prefix).

    Definitions and Theorems

    Function: compute-mandatory-prefix-for-three-byte-opcode$inline

    (defun compute-mandatory-prefix-for-three-byte-opcode$inline
           (proc-mode second-escape-byte opcode prefixes)
      (declare (type (integer 0 4) proc-mode)
               (type (unsigned-byte 8)
                     second-escape-byte)
               (type (unsigned-byte 8) opcode)
               (type (unsigned-byte 52) prefixes))
      (declare (xargs :guard (or (equal second-escape-byte 56)
                                 (equal second-escape-byte 58))))
      (case second-escape-byte
        (56 (compute-mandatory-prefix-for-0f-38-three-byte-opcode
                 proc-mode opcode prefixes))
        (58 (compute-mandatory-prefix-for-0f-3a-three-byte-opcode
                 proc-mode opcode prefixes))
        (otherwise 0)))

    Theorem: return-type-of-compute-mandatory-prefix-for-three-byte-opcode

    (defthm
          return-type-of-compute-mandatory-prefix-for-three-byte-opcode
      (b* ((mandatory-prefix (compute-mandatory-prefix-for-three-byte-opcode$inline
                                  proc-mode
                                  second-escape-byte opcode prefixes)))
        (unsigned-byte-p 8 mandatory-prefix))
      :rule-classes :rewrite)