From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Lu4Vy-0003I9-CK for mharc-grub-devel@gnu.org; Wed, 15 Apr 2009 08:46:55 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lu4Vv-0003H9-Ov for grub-devel@gnu.org; Wed, 15 Apr 2009 08:46:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lu4Vq-0003Fj-Ci for grub-devel@gnu.org; Wed, 15 Apr 2009 08:46:50 -0400 Received: from [199.232.76.173] (port=32775 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lu4Vp-0003FY-Ey for grub-devel@gnu.org; Wed, 15 Apr 2009 08:46:45 -0400 Received: from mail-fx0-f166.google.com ([209.85.220.166]:56428) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lu4Vo-0001mE-Tc for grub-devel@gnu.org; Wed, 15 Apr 2009 08:46:45 -0400 Received: by fxm10 with SMTP id 10so3185082fxm.42 for ; Wed, 15 Apr 2009 05:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=BnbZXu6yn+rJ/O7r4/H/WfFEtMcQGFwcbcxT2LyPAWs=; b=gbxb0C/ZmsNS6Iz6fi6n2+cCne9iid1xo/2MhdzPvgfdngjphYcYyu0EpIrEppynxv T39/L+2vQg42I5brLztmWJ3+TOUdtL8/M/2BUMmr/GvJMSGKhBIiocBqSdJM5ddD541c o/g+qiiW74iD/4Nk8kBXv4l6pxfZlKJFjSJo8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=IkgMZ/O/JWWEdcFskmEOfFaBuSWIKbMaowkgHoZwBqeDtFakF2pzHWWa0JhAkOlZuo 62X7/bFlNiC8aGydUevChF9ye66nqiMnGc42tuZTT9ThP8wvUgOIZU9UN9dddQ05KWKZ zwzYzyXVFr1A7esc3LY56Z1mNTPRZmVtjcBEQ= Received: by 10.86.76.20 with SMTP id y20mr127919fga.56.1239799603802; Wed, 15 Apr 2009 05:46:43 -0700 (PDT) Received: from ?192.168.1.100? (121.88.202.62.cust.bluewin.ch [62.202.88.121]) by mx.google.com with ESMTPS id 3sm10447970fge.14.2009.04.15.05.46.42 (version=SSLv3 cipher=RC4-MD5); Wed, 15 Apr 2009 05:46:42 -0700 (PDT) Message-ID: <49E5D731.80503@gmail.com> Date: Wed, 15 Apr 2009 14:46:41 +0200 From: phcoder User-Agent: Thunderbird 2.0.0.21 (X11/20090409) MIME-Version: 1.0 To: The development of GRUB 2 References: <200904111919.49761.okuji@enbug.org> <20090411.044848.183598331.davem@davemloft.net> <49E0EB22.4070308@gmail.com> <20090412.010719.229891360.davem@davemloft.net> <49E1E2BC.3020405@gmail.com> <1239572015.14481.32.camel@ct> <1239573107.14481.41.camel@ct> <49E26909.8080701@gmail.com> <1239600217.4166.20.camel@ct> In-Reply-To: <1239600217.4166.20.camel@ct> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit. X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 12:46:52 -0000 commited Pavel Roskin wrote: > On Mon, 2009-04-13 at 00:19 +0200, phcoder wrote: >> I already understood what you meant in first mail. Sorry for not paying >> attention to this detail. Here is my proposition. IT decreases the size >> from 31224 to 31068 bytes. I tested it with following input >> grub_printf ("Hello World: %d %ld %lld %x %lx %llx %u %lu %llu\n", >> 0xffffffff, 0xffffffff, 0xffffffffffffffffLL, >> 0xffffffff, 0xffffffff, 0xffffffffffffffffLL, >> 0xffffffff, 0xffffffff, 0xffffffffffffffffLL); >> grub_printf ("Hello World: %d %ld %lld %x %lx %llx %u %lu %llu\n", >> 0x0fffffff, 0x0fffffff, 0x0fffffffffffffffLL, >> 0x0fffffff, 0x0fffffff, 0x0fffffffffffffffLL, >> 0x0fffffff, 0x0fffffff, 0x0fffffffffffffffLL); >> Output was: >> Hello World: -1 -1 -1 ffffffff ffffffff ffffffffffffffff 4294967295 >> 4294967295 18446744073709551615 >> Hello World: 268435455 268435455 1152921504606846975 fffffff fffffff >> fffffffffffffff 268435455 268435455 1152921504606846975 > > Thanks for the patch and for the test! You patch doesn't look as > pedantic as mine, but apparently the compiler can optimize you code > better. I have no objections to your patch. > -- Regards Vladimir 'phcoder' Serbinenko