• 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
          • 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
            • Two-byte-opcodes
            • One-byte-opcodes
            • Fp-opcodes
            • Instruction-semantic-functions
              • Sar-spec
              • Shr-spec
              • Sal/shl-spec
              • Rol-spec
              • Ror-spec
              • Rcl-spec
              • Rcr-spec
              • Simd-sub-spec
              • Simd-add-spec
              • Imul-spec
              • Mul-spec
              • Idiv-spec
              • Div-spec
              • Shrd-spec
              • Shld-spec
              • Gpr-arith/logic-spec
              • Shrx-spec
                • Shrx-spec-64
                • Shrx-spec-32
              • Shlx-spec
              • Sarx-spec
              • Floating-point-specifications
            • X86-illegal-instruction
            • Implemented-opcodes
            • Opcode-maps
            • X86-general-protection
            • X86-device-not-available
            • X86-step-unimplemented
            • Privileged-opcodes
            • Three-byte-opcodes
          • 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
  • Instruction-semantic-functions

Shrx-spec

Specification for the SHRX instruction.

Signature
(shrx-spec size src cnt) → *
Arguments
cnt — Guard (unsigned-byte-p 6 cnt).

Since this instruction does not affect the flags, this function does not take or return flags.

Definitions and Theorems

Function: shrx-spec$inline

(defun shrx-spec$inline (size src cnt)
  (declare (type (member 4 8) size))
  (declare (xargs :guard (unsigned-byte-p 6 cnt)))
  (declare (xargs :guard
                  (case size
                    (4 (n32p src))
                    (8 (n64p src))
                    (otherwise nil))))
  (case size
    (4 (shrx-spec-32 src cnt))
    (8 (shrx-spec-64 src cnt))
    (otherwise 0)))

Theorem: natp-shrx-spec

(defthm natp-shrx-spec
  (natp (shrx-spec size src cnt))
  :rule-classes :type-prescription)

Subtopics

Shrx-spec-64
Shrx-spec-32