Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Nov 2000 11:40:02 -0800
From:      David Greenman <dg@root.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        current@FreeBSD.ORG
Subject:   Re: slight improvement in locore.s? 
Message-ID:  <200011231940.LAA20771@implode.root.com>
In-Reply-To: Your message of "Thu, 23 Nov 2000 08:37:26 PST." <3A1D47C6.D35464F0@elischer.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
>locore.s includes:
>#define ALLOCPAGES(foo) \ 
>        movl    R(physfree), %esi ; \
>        movl    $((foo)*PAGE_SIZE), %eax ; \
>        addl    %esi, %eax ; \
>        movl    %eax, R(physfree) ; \
>        movl    %esi, %edi ; \
>        movl    $((foo)*PAGE_SIZE),%ecx ; \
>        xorl    %eax,%eax ; \
>        cld ; \
>        rep ; \
>        stosb
>        
>
>might it be a very slight optimisation to change this to:
>#define ALLOCPAGES(foo) \ 
>        movl    R(physfree), %esi ; \
>        movl    $((foo)*PAGE_SIZE), %eax ; \
>        movl    %eax, %ecx ; \
>        addl    %esi, %eax ; \
>        movl    %eax, R(physfree) ; \
>        movl    %esi, %edi ; \
>        xorl    %eax,%eax ; \
>        cld ; \
>        rep ; \
>        stosb
>        
>??

   Improvement in what way?
   Readability? I don't think so.
   Performance? This macro is only used in the initial bootstrap of the
kernel.
   ...changing it might save a few bytes, however.

-DG

David Greenman
Co-founder, The FreeBSD Project - http://www.freebsd.org
President, TeraSolutions, Inc. - http://www.terasolutions.com
Pave the road of life with opportunities.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011231940.LAA20771>