• 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
                • Shld-spec-64
                • Shld-spec-32
                • Shld-spec-16
              • Gpr-arith/logic-spec
              • Shrx-spec
              • 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

Shld-spec

Specification for the SHLD instruction.

Signature
(shld-spec size dst src cnt input-rflags) → (mv * * * *)

Definitions and Theorems

Function: shld-spec$inline

(defun shld-spec$inline (size dst src cnt input-rflags)
  (declare (type (member 2 4 8) size)
           (type (unsigned-byte 32) input-rflags))
  (declare (xargs :guard (and (unsigned-byte-p 6 cnt)
                              (case size
                                (2 (and (n16p dst) (n16p src)))
                                (4 (and (n32p dst) (n32p src)))
                                (8 (and (n64p dst) (n64p src)))
                                (otherwise nil)))))
  (case size
    (2 (shld-spec-16 dst src cnt input-rflags))
    (4 (shld-spec-32 dst src cnt input-rflags))
    (8 (shld-spec-64 dst src cnt input-rflags))
    (otherwise (mv 0 nil 0 0))))

Theorem: natp-mv-nth-0-shld-spec

(defthm natp-mv-nth-0-shld-spec
  (natp (mv-nth 0
                (shld-spec size dst src cnt input-rflags)))
  :rule-classes :type-prescription)

Theorem: booleanp-of-mv-nth-1-shld-spec

(defthm booleanp-of-mv-nth-1-shld-spec
  (booleanp (mv-nth 1
                    (shld-spec size dst src cnt input-rflags))))

Theorem: n32p-mv-nth-2-shld-spec

(defthm n32p-mv-nth-2-shld-spec
 (unsigned-byte-p
      32
      (mv-nth 2
              (shld-spec size dst src cnt input-rflags)))
 :rule-classes
 (:rewrite
  (:type-prescription
      :corollary
      (natp (mv-nth 2
                    (shld-spec size dst src cnt input-rflags)))
      :hints
      (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp))))
  (:linear
   :corollary
   (and (<= 0
            (mv-nth 2
                    (shld-spec size dst src cnt input-rflags)))
        (< (mv-nth 2
                   (shld-spec size dst src cnt input-rflags))
           4294967296))
   :hints
   (("Goal"
        :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))

Theorem: n32p-mv-nth-3-shld-spec

(defthm n32p-mv-nth-3-shld-spec
 (unsigned-byte-p
      32
      (mv-nth 3
              (shld-spec size dst src cnt input-rflags)))
 :rule-classes
 (:rewrite
  (:type-prescription
      :corollary
      (natp (mv-nth 3
                    (shld-spec size dst src cnt input-rflags)))
      :hints
      (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp))))
  (:linear
   :corollary
   (and (<= 0
            (mv-nth 3
                    (shld-spec size dst src cnt input-rflags)))
        (< (mv-nth 3
                   (shld-spec size dst src cnt input-rflags))
           4294967296))
   :hints
   (("Goal"
        :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))

Subtopics

Shld-spec-64
Shld-spec-32
Shld-spec-16