From owner-freebsd-current Thu Nov 23 11:44:13 2000 Delivered-To: freebsd-current@freebsd.org Received: from cs.utep.edu (mail.cs.utep.edu [129.108.5.3]) by hub.freebsd.org (Postfix) with ESMTP id 627A537B4C5 for ; Thu, 23 Nov 2000 11:44:10 -0800 (PST) Received: from gecko (gecko [129.108.5.51]) by cs.utep.edu (8.10.1/8.10.1) with ESMTP id eANJhrF04412; Thu, 23 Nov 2000 12:43:53 -0700 (MST) Date: Thu, 23 Nov 2000 12:43:53 -0700 (MST) From: X-Sender: janb@gecko To: David Greenman Cc: Julian Elischer , current@FreeBSD.ORG Subject: Re: slight improvement in locore.s? In-Reply-To: <200011231940.LAA20771@implode.root.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It does not impair readability. As long as that is true, I believe its prudent to save every byte possible... Only my 2 cents worth. JAn On Thu, 23 Nov 2000, David Greenman wrote: > >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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message