(adc-af-spec8 dst src cf) → *
Function:
(defun adc-af-spec8$inline (dst src cf) (declare (type (unsigned-byte 8) dst) (type (unsigned-byte 8) src) (type (unsigned-byte 1) cf)) (b* (((the (unsigned-byte 4) dst-3-0) (mbe :logic (part-select dst :low 0 :width 4) :exec (logand 15 dst))) ((the (unsigned-byte 4) src-3-0) (mbe :logic (part-select src :low 0 :width 4) :exec (logand 15 src))) (adc (the (unsigned-byte 6) (+ (the (unsigned-byte 4) dst-3-0) (the (unsigned-byte 4) src-3-0) (the (unsigned-byte 1) cf)))) (af (the (unsigned-byte 1) (bool->bit (< 15 adc))))) af))
Theorem:
(defthm n01p-adc-af-spec8 (unsigned-byte-p 1 (adc-af-spec8 dst src cf)) :rule-classes (:rewrite (:type-prescription :corollary (natp (adc-af-spec8 dst src cf)) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp)))) (:linear :corollary (and (<= 0 (adc-af-spec8 dst src cf)) (< (adc-af-spec8 dst src cf) 2)) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))