(combine16s a1 a0) merges unsigned bytes, producing the 16-bit signed
interpretation of
Function:
(defun combine16s$inline (a1 a0) (declare (type (unsigned-byte 8) a1 a0)) (mbe :logic (logior (ash (fast-logext 8 (nfix a1)) 8) (nfix a0)) :exec (the (signed-byte 16) (logior (the (signed-byte 16) (ash (the (signed-byte 8) (fast-logext 8 a1)) 8)) a0))))
Theorem:
(defthm combine16s-signed-byte (implies (and (force (unsigned-byte-p 8 a1)) (force (unsigned-byte-p 8 a0))) (signed-byte-p 16 (combine16s a1 a0))))