From: Matthias-Christian Ott <matthias.christian@tiscali.de>
To: Matthias-Christian Ott <matthias.christian@tiscali.de>
Cc: Rene Rebe <rene@exactcode.de>, Linus Torvalds <torvalds@osdl.org>,
git@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH GIT 0.6] make use of register variables & size_t
Date: Mon, 25 Apr 2005 15:01:47 +0200 [thread overview]
Message-ID: <426CEA3B.50300@tiscali.de> (raw)
In-Reply-To: <426CE904.9010505@tiscali.de>
Matthias-Christian Ott wrote:
> Rene Rebe wrote:
>
>> Hi,
>>
>> Matthias-Christian Ott wrote:
>>
>>> The "git" didn't try store small variables, which aren't referenced,
>>> in the processor registers. It also didn't use the size_t type. I
>>> corrected a C++ style comment too.
>>
>>
>>
>> Well, modern compilers take register as a non-binding hint. Your
>> register storage specification for those loop counters will not make
>> any change. You have not looked into the resulting binary?
>>
>> Also // is valid C99 ...
>>
>> Yours,
>>
> But if you use only /* */ comments and there's a // comment it looks
> ugly :).
>
> I've disassembled the code and it for me (I'm not a professional
> assembler coder) it looks like it's stored in a register because the ebp
> offsets are smaller and the gcc (4.0) wouldn't cause an error if you
> reference them.
>
> Matthias-Christian Ott
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Here's some example code (diff of the assembler codes) which shows what
I mean:
- movl %eax, -8(%ebp)
+ movl %eax, -4(%ebp)
[..]
- leal 1(%eax), %ecx
- movl -52(%ebp), %edx
+ leal 1(%eax), %edx
movl 12(%ebp), %eax
- subl %edx, %eax
- movl %eax, %edx
- movl -52(%ebp), %eax
+ movl %eax, %ecx
+ subl -80(%ebp), %ecx
+ movl -80(%ebp), %eax
sall $2, %eax
movl %eax, %ebx
addl 8(%ebp), %ebx
next prev parent reply other threads:[~2005-04-25 13:02 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-25 11:18 [PATCH GIT 0.6] make use of register variables & size_t Matthias-Christian Ott
2005-04-25 11:39 ` Rene Rebe
2005-04-25 12:56 ` Matthias-Christian Ott
2005-04-25 13:01 ` Matthias-Christian Ott [this message]
2005-04-25 18:06 ` David A. Wheeler
2005-04-25 12:32 ` Petr Baudis
2005-04-25 13:07 ` Pekka Enberg
2005-04-25 14:52 ` Linus Torvalds
2005-04-25 16:59 ` Matthias-Christian Ott
2005-04-25 17:12 ` Jan-Benedict Glaw
2005-04-25 17:13 ` Thomas Glanzmann
2005-04-25 17:18 ` Jan-Benedict Glaw
2005-04-25 18:23 ` Matthias-Christian Ott
2005-04-25 17:22 ` Valdis.Kletnieks
2005-04-25 17:23 ` Linus Torvalds
2005-04-25 18:15 ` Matthias-Christian Ott
2005-04-25 18:50 ` Linus Torvalds
2005-04-25 20:50 ` Arjan van de Ven
2005-04-25 18:55 ` Valdis.Kletnieks
2005-04-25 19:43 ` the REGISTER thread Brian O'Mahoney
2005-04-25 17:38 ` [PATCH GIT 0.6] make use of register variables & size_t Dmitry Torokhov
2005-04-25 17:51 ` Horst von Brand
[not found] <3X9X6-5JP-27@gated-at.bofh.it>
2005-04-25 17:36 ` Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
[not found] ` <3Xdel-8u2-43@gated-at.bofh.it>
[not found] ` <3XfpD-21C-11@gated-at.bofh.it>
2005-04-26 18:18 ` Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
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=426CEA3B.50300@tiscali.de \
--to=matthias.christian@tiscali.de \
--cc=git@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rene@exactcode.de \
--cc=torvalds@osdl.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.