From owner-svn-src-all@FreeBSD.ORG Thu Apr 29 05:45:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA9FC1065670; Thu, 29 Apr 2010 05:45:47 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 285498FC15; Thu, 29 Apr 2010 05:45:45 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id IAA28021; Thu, 29 Apr 2010 08:45:43 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1O7MZD-0008Au-4p; Thu, 29 Apr 2010 08:45:43 +0300 Message-ID: <4BD91D05.3090806@freebsd.org> Date: Thu, 29 Apr 2010 08:45:41 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Jung-uk Kim References: <201004281726.o3SHQ6xN095645@svn.freebsd.org> In-Reply-To: <201004281726.o3SHQ6xN095645@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Roman Divacky Subject: Re: svn commit: r207330 - head/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2010 05:45:47 -0000 on 28/04/2010 20:26 Jung-uk Kim said the following: > Author: jkim > Date: Wed Apr 28 17:26:05 2010 > New Revision: 207330 > URL: http://svn.freebsd.org/changeset/base/207330 > > Log: > Remove dead code. Calculated greatest common divisor was not used at all. > On top of that, LLVM+Clang mis-compiles this code because of its register > allocator bug. > > Analyzed by: Andrew Reilly (areilly at bigpond dot net dot au) > Reviewed by: ariff, rdivacky > MFC after: 3 days I think that we also owe an attribution to Alexander Best , who discovered the problem, reported it and did an immense job of narrowing it down to a single function. > Modified: > head/sys/dev/sound/pcm/buffer.c > > Modified: head/sys/dev/sound/pcm/buffer.c > ============================================================================== > --- head/sys/dev/sound/pcm/buffer.c Wed Apr 28 15:38:01 2010 (r207329) > +++ head/sys/dev/sound/pcm/buffer.c Wed Apr 28 17:26:05 2010 (r207330) > @@ -568,7 +568,6 @@ sndbuf_updateprevtotal(struct snd_dbuf * > unsigned int > snd_xbytes(unsigned int v, unsigned int from, unsigned int to) > { > - unsigned int w, x, y; > > if (from == to) > return v; > @@ -576,16 +575,6 @@ snd_xbytes(unsigned int v, unsigned int > if (from == 0 || to == 0 || v == 0) > return 0; > > - x = from; > - y = to; > - while (y != 0) { > - w = x % y; > - x = y; > - y = w; > - } > - from /= x; > - to /= x; > - > return (unsigned int)(((u_int64_t)v * to) / from); > } > -- Andriy Gapon