All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit.
Date: Mon, 13 Apr 2009 01:23:37 -0400	[thread overview]
Message-ID: <1239600217.4166.20.camel@ct> (raw)
In-Reply-To: <49E26909.8080701@gmail.com>

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	other threads:[~2009-04-13  5:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-11  8:08 [PATCH]: grub: Fix handling of long printf arguments on 64-bit David Miller
2009-04-11 10:19 ` Yoshinori K. Okuji
2009-04-11 11:48   ` David Miller
2009-04-11 19:10     ` phcoder
2009-04-12  3:21       ` Pavel Roskin
2009-04-12  8:07       ` David Miller
2009-04-12 12:46         ` phcoder
2009-04-12 14:19           ` Isaac Dupree
2009-04-12 21:36             ` Pavel Roskin
2009-04-12 21:33           ` Pavel Roskin
2009-04-12 21:51             ` Pavel Roskin
2009-04-12 22:19               ` phcoder
2009-04-13  5:23                 ` Pavel Roskin [this message]
2009-04-15 12:46                   ` phcoder
2009-04-12  6:39 ` Pavel Roskin
2009-04-12  8:05   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1239600217.4166.20.camel@ct \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.