From owner-freebsd-current@FreeBSD.ORG Sun Jun 13 16:16:23 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46B66106566B for ; Sun, 13 Jun 2010 16:16:23 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 0771B8FC1B for ; Sun, 13 Jun 2010 16:16:22 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 102421FFC33; Sun, 13 Jun 2010 16:16:21 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id CCE5C84461; Sun, 13 Jun 2010 18:14:11 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: ticso@cicely.de References: <20100611162118.GR39829@acme.spoerlein.net> <867hm5tl6u.fsf@ds4.des.no> <20100612153526.GA3632@acme.spoerlein.net> <20100612163208.GS87112@cicely7.cicely.de> <864oh86tnl.fsf@ds4.des.no> <20100612225216.GT87112@cicely7.cicely.de> <86k4q33pk2.fsf@ds4.des.no> <20100613160035.GD87112@cicely7.cicely.de> Date: Sun, 13 Jun 2010 18:14:11 +0200 In-Reply-To: <20100613160035.GD87112@cicely7.cicely.de> (Bernd Walter's message of "Sun, 13 Jun 2010 18:00:35 +0200") Message-ID: <86fx0q52r0.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: current@freebsd.org Subject: Re: Cleanup for cryptographic algorithms vs. compiler optimizations X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2010 16:16:23 -0000 Bernd Walter writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Bernd Walter writes: > > > Amazing - this is one of the things which can get nasty if you try > > > some kind of microtuning. > > Only if you break the rules. Bad code is always bad, even if it > > sometimes works by accident. > To expect that function calls are replaced with other functions isn't a > very obvious rule. You don't need to know that gcc replaces printf() with puts(). That's the whole point of the as-if rule: the compiler can only modify the program in ways that do not change observable behavior. The only way you can tell that gcc did it is if you break the rules, such as by defining your own version of printf() or puts(). DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no