From owner-freebsd-hackers Mon Mar 15 20:23:47 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (Postfix) with ESMTP id 974D9150BB for ; Mon, 15 Mar 1999 20:23:46 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.3/8.8.8) with ESMTP id UAA02703; Mon, 15 Mar 1999 20:16:52 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199903160416.UAA02703@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: "Andrew Reilly" Cc: Matthew Dillon , "Stephen J. Roznowski" , freebsd-hackers@FreeBSD.ORG Subject: Re: Use of "register" in code In-reply-to: Your message of "Tue, 16 Mar 1999 15:17:44 +1100." <19990316151744.A39973@reilly.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 15 Mar 1999 20:16:52 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Mon, Mar 15, 1999 at 07:49:45PM -0800, Matthew Dillon wrote: > > :I've been looking at merging some NetBSD fixes for games, and I noticed > > :that they have removed the "register" declaration from (at least) this > > :section of the code tree. > > : > > :Are these register declarations useful, or are they just "historical > > :artifacts"? If they are just historical artifacts, should they be > > :removed? > > : > > :Thanks, > > :-- > > :Stephen J. Roznowski (sjr@home.net) > > > > The register declarations are useless historical artifacts. > > Why do you say that? "register" in a declaration has a specific > semantic meaning that isn't (to my knowledge) duplicated by any > other language mechanism, and that is "this variable does not exist > in the memory space, and so _cannot_ be de-referenced with "&" or > modified by an asignment through a pointer." Register pointer > variables and temporaries are very important for preventing C > compilers from producing pessimistic inner loop code. That's not what 'register' means, and unfortunately the use of 'register' by code authors doesn't help as they're not privy to the actual layout of the code at the point where register allocation is performed. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message