From owner-freebsd-current@FreeBSD.ORG Fri Nov 21 16:15:20 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7C845ED for ; Fri, 21 Nov 2014 16:15:20 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3006635 for ; Fri, 21 Nov 2014 16:15:20 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A834DB989; Fri, 21 Nov 2014 11:15:19 -0500 (EST) From: John Baldwin To: freebsd-current@freebsd.org Subject: Re: [PATCH]: further shrinking of boot2 Date: Fri, 21 Nov 2014 10:16:58 -0500 Message-ID: <40529392.oiqLG4jV1P@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-PRERELEASE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20141121125632.GA23706@vlakno.cz> References: <20141121125632.GA23706@vlakno.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 21 Nov 2014 11:15:19 -0500 (EST) Cc: Roman Divacky X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 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: Fri, 21 Nov 2014 16:15:20 -0000 On Friday, November 21, 2014 01:56:32 PM Roman Divacky wrote: > Hi all! > > In an effort to help import clang3.5 I looked at squeezing a few more bytes > from boot2. > > > http://rys.vlakno.cz/~rdivacky/boot2.diet.patch > > > Please test and review the patch. It survived my qemu boot attempt so it's > not completely broken. But I would like to have some more testing and review > comments before I move forward with this. > > Fwiw, it shrinks boot2 by 16 bytes when compiled with clang34 and by 28 > bytes when compiled with clang35. I would prefer 'int k' over 'int i2/j2'. Also, do you really have to move the variable definitions to get the size change? I'd prefer to leave the variable declarations where they are if possible (and just add 'int k' or 'size_t k' in the existing variable blocks). -- John Baldwin