(sbb-af-spec8 dst src cf) → *
Function:
(defun sbb-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))) ((the (unsigned-byte 6) sbb) (logand 63 (- (the (unsigned-byte 4) dst-3-0) (+ (the (unsigned-byte 4) src-3-0) (the (unsigned-byte 4) cf))))) (af (the (unsigned-byte 1) (bool->bit (> sbb 15))))) af))
Theorem:
(defthm n01p-sbb-af-spec8 (unsigned-byte-p 1 (sbb-af-spec8 dst src cf)) :rule-classes (:rewrite (:type-prescription :corollary (natp (sbb-af-spec8 dst src cf)) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp)))) (:linear :corollary (and (<= 0 (sbb-af-spec8 dst src cf)) (< (sbb-af-spec8 dst src cf) 2)) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))