• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • 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
                • Gpr-arith/logic-spec-8
                  • Gpr-xadd-spec-8
                  • Gpr-adc-spec-8
                  • Gpr-sbb-spec-8
                  • Gpr-add-spec-8
                  • Gpr-adcx/adox-spec-8
                    • Gpr-sub-spec-8
                    • Gpr-xor-spec-8
                    • Gpr-and-spec-8
                    • Gpr-or-spec-8
                  • Gpr-arith/logic-spec-4
                  • Gpr-arith/logic-spec-2
                  • Gpr-arith/logic-spec-1
                • 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
    • Gpr-arith/logic-spec-8

    Gpr-adcx/adox-spec-8

    Signature
    (gpr-adcx/adox-spec-8 adcx dst src input-rflags) → (mv * * *)
    Arguments
    adcx — Guard (booleanp adcx).

    Definitions and Theorems

    Function: gpr-adcx/adox-spec-8$inline

    (defun gpr-adcx/adox-spec-8$inline (adcx dst src input-rflags)
     (declare (type (unsigned-byte 64) dst)
              (type (unsigned-byte 64) src)
              (type (unsigned-byte 32) input-rflags))
     (declare (xargs :guard (booleanp adcx)))
     (b*
      ((dst (mbe :logic (n-size 64 dst) :exec dst))
       (src (mbe :logic (n-size 64 src) :exec src))
       (input-rflags (mbe :logic (n32 input-rflags)
                          :exec input-rflags))
       (input-cf (the (unsigned-byte 1)
                      (if adcx (rflagsbits->cf input-rflags)
                        (rflagsbits->of input-rflags))))
       (raw-result (the (unsigned-byte 65)
                        (+ (the (unsigned-byte 64) dst)
                           (the (unsigned-byte 64) src)
                           (the (unsigned-byte 1) input-cf))))
       (result (the (unsigned-byte 64)
                    (n-size 64 raw-result)))
       (cf (the (unsigned-byte 1)
                (cf-spec64 raw-result)))
       (output-rflags
            (if adcx (mbe :logic (change-rflagsbits input-rflags :cf cf)
                          :exec (the (unsigned-byte 32)
                                     (!rflagsbits->cf cf input-rflags)))
              (mbe :logic (change-rflagsbits input-rflags :of cf)
                   :exec (the (unsigned-byte 32)
                              (!rflagsbits->of cf input-rflags)))))
       (output-rflags (mbe :logic (n32 output-rflags)
                           :exec output-rflags))
       (undefined-flags 0))
      (mv result output-rflags undefined-flags)))

    Theorem: n64-mv-nth-0-gpr-adcx/adox-spec-8

    (defthm n64-mv-nth-0-gpr-adcx/adox-spec-8
     (unsigned-byte-p
          64
          (mv-nth 0
                  (gpr-adcx/adox-spec-8 adcx dst src input-rflags)))
     :rule-classes
     (:rewrite
      (:type-prescription
        :corollary
        (natp (mv-nth 0
                      (gpr-adcx/adox-spec-8 adcx dst src input-rflags)))
        :hints
        (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp))))
      (:linear
       :corollary
       (and
          (<= 0
              (mv-nth 0
                      (gpr-adcx/adox-spec-8 adcx dst src input-rflags)))
          (< (mv-nth 0
                     (gpr-adcx/adox-spec-8 adcx dst src input-rflags))
             18446744073709551616))
       :hints
       (("Goal"
            :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))

    Theorem: mv-nth-1-gpr-adcx/adox-spec-8

    (defthm mv-nth-1-gpr-adcx/adox-spec-8
     (unsigned-byte-p
          32
          (mv-nth 1
                  (gpr-adcx/adox-spec-8 adcx dst src input-rflags)))
     :rule-classes
     (:rewrite
      (:type-prescription
        :corollary
        (natp (mv-nth 1
                      (gpr-adcx/adox-spec-8 adcx dst src input-rflags)))
        :hints
        (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp))))
      (:linear
       :corollary
       (and
          (<= 0
              (mv-nth 1
                      (gpr-adcx/adox-spec-8 adcx dst src input-rflags)))
          (< (mv-nth 1
                     (gpr-adcx/adox-spec-8 adcx dst src input-rflags))
             4294967296))
       :hints
       (("Goal"
            :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))

    Theorem: mv-nth-2-gpr-adcx/adox-spec-8

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