Optimized implementation of 16-bit sign-extension.
(fast-logext16 x) → *
Function:
(defun fast-logext16$inline (x) (declare (xargs :guard (integerp x))) (let ((__function__ 'fast-logext16)) (declare (ignorable __function__)) (mbe :logic (logext 16 x) :exec (the (signed-byte 16) (- (the (unsigned-byte 16) (logxor (the (unsigned-byte 16) (logand 65535 x)) (the (unsigned-byte 16) 32768))) 32768)))))