grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit.


From: phcoder
Subject: Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit.
Date: Wed, 15 Apr 2009 14:46:41 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090409)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]