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: Pavel Roskin
Subject: Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit.
Date: Mon, 13 Apr 2009 01:23:37 -0400

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




reply via email to

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