Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Mar 1999 16:25:23 +1100 (EST)
From:      "Andrew Reilly" <andrew@lake.com.au>
To:        dillon@apollo.backplane.com
Cc:        andrew@lake.com.au, sjr@home.net, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Use of "register" in code
Message-ID:  <19990316052524.40662.qmail@areilly.bpc-users.org>
In-Reply-To: <199903160509.VAA06242@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Matthew Dillon said:
>     Let me extend this with another example:  Protection against aliasing
>     is not usually an issue with stack variables.

Of course it is.  It's one of the principle reasons that Fortran can
still generate tighter inner loop code than straight-forward C.  The
handbook of numerical C code says in big letters: fetch to register
temporaries if a value is to be re-used, and use register variables for
all pointers and indices.

>  On the otherhand, it is
>     something that would be much more useful with structural fields 
>     or globals.

Not sure why you would want that.  Gcc has tweaks to allow you to put
globals in specific machine registers, but that's hardly standard C or
useful.

>     I don't know a single programmer who uses 'register' to mean 'alias
>     protection'.

Well, you've met one now :-)

-- 
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?19990316052524.40662.qmail>