From owner-freebsd-current Thu Nov 23 11:41:32 2000 Delivered-To: freebsd-current@freebsd.org Received: from implode.root.com (root.com [209.102.106.178]) by hub.freebsd.org (Postfix) with ESMTP id B937337B479 for ; Thu, 23 Nov 2000 11:41:29 -0800 (PST) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.8/8.8.5) with ESMTP id LAA20771; Thu, 23 Nov 2000 11:40:02 -0800 (PST) Message-Id: <200011231940.LAA20771@implode.root.com> To: Julian Elischer Cc: current@FreeBSD.ORG Subject: Re: slight improvement in locore.s? In-reply-to: Your message of "Thu, 23 Nov 2000 08:37:26 PST." <3A1D47C6.D35464F0@elischer.org> From: David Greenman Reply-To: dg@root.com Date: Thu, 23 Nov 2000 11:40:02 -0800 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >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