From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LtEe4-00051H-Cr for mharc-grub-devel@gnu.org; Mon, 13 Apr 2009 01:23:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LtEe1-0004zs-Um for grub-devel@gnu.org; Mon, 13 Apr 2009 01:23:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LtEdx-0004wq-2A for grub-devel@gnu.org; Mon, 13 Apr 2009 01:23:45 -0400 Received: from [199.232.76.173] (port=41334 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LtEdw-0004wf-GC for grub-devel@gnu.org; Mon, 13 Apr 2009 01:23:40 -0400 Received: from c60.cesmail.net ([216.154.195.49]:5476) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1LtEdw-0008MJ-1j for grub-devel@gnu.org; Mon, 13 Apr 2009 01:23:40 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 13 Apr 2009 01:23:39 -0400 Received: from [192.168.0.220] (pool-141-151-93-148.phlapa.east.verizon.net [141.151.93.148]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 428A034C6A for ; Mon, 13 Apr 2009 01:25:09 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <49E26909.8080701@gmail.com> 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> Content-Type: text/plain Date: Mon, 13 Apr 2009 01:23:37 -0400 Message-Id: <1239600217.4166.20.camel@ct> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 (2.24.5-1.fc10) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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: Mon, 13 Apr 2009 05:23:46 -0000 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, Pavel Roskin