All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Franke <Christian.Franke@t-online.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Endianness macros capitalization
Date: Sun, 20 Jul 2008 15:45:10 +0200	[thread overview]
Message-ID: <48834166.7050906@t-online.de> (raw)
In-Reply-To: <1KGZ7b-1EcJsG0@fwd32.aul.t-online.de>

Christian Franke wrote:
> Pavel Roskin wrote:
>   
>> On Tue, 2008-07-08 at 20:04 +0200, Christian Franke wrote:
>>
>>     
>>> With old gcc versions without the "rol" optimization, even the 16
>>> bit swap should be a function:
>>>
>>>       
>> Or better yet, an asm statement.
>>
>> We should consider optimized assembly vs function call.  Even the
>> 32-bit swap could be shorter:
>>
>> a:   86 c4                   xchg   %al,%ah
>> c:   c1 c0 10                rol    $0x10,%eax
>> f:   86 c4                   xchg   %al,%ah
>> 11:
>>
>> That's 7 bytes!  ...
>>     
>
> But the function call in the 32-bit case requires only 5 bytes :-)
>   

Sorry, I was wrong here. The assumption about function call size was 
only true for module-local calls. If a module calls a function in 
kernel, each 5 byte call requires another 8 bytes for the ELF relocation 
table entry.

Christian




  parent reply	other threads:[~2008-07-20 13:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-05 13:27 Endianness macros capitalization Javier Martín
2008-07-05 21:30 ` Pavel Roskin
2008-07-05 22:54   ` Javier Martín
2008-07-05 23:14     ` Pavel Roskin
2008-07-06 18:30     ` Robert Millan
2008-07-06 20:02       ` Javier Martín
2008-07-07 19:25         ` Christian Franke
2008-07-08 18:04           ` Christian Franke
2008-07-09  6:47             ` Pavel Roskin
2008-07-09 12:50               ` Christian Franke
2008-07-09 17:57                 ` Pavel Roskin
2008-07-10 19:25                   ` Christian Franke
2008-07-10 19:59                     ` Pavel Roskin
2008-07-11  7:06                       ` Jordi Mallach
2008-07-11  8:53                     ` Pavel Roskin
2008-07-11  9:07                       ` Pavel Roskin
2008-07-11 13:21                         ` Christian Franke
2008-07-11 18:33                           ` Pavel Roskin
2008-07-20 13:45                 ` Christian Franke [this message]
2008-07-20 23:31                   ` Pavel Roskin

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=48834166.7050906@t-online.de \
    --to=christian.franke@t-online.de \
    --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.