Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Mar 1999 15:17:44 +1100
From:      "Andrew Reilly" <andrew@lake.com.au>
To:        Matthew Dillon <dillon@apollo.backplane.com>, "Stephen J. Roznowski" <sjr@home.net>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Use of "register" in code
Message-ID:  <19990316151744.A39973@reilly.home>
In-Reply-To: <199903160349.TAA05543@apollo.backplane.com>; from Matthew Dillon on Mon, Mar 15, 1999 at 07:49:45PM -0800
References:  <199903160333.WAA06493@istari.home.net> <199903160349.TAA05543@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-- 
Andrew


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




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