Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site osu-eddie.UUCP
Path: utzoo!watmath!clyde!cbosgd!osu-eddie!pritch
From: pritch@osu-eddie.UUCP (Norman Pritchett)
Newsgroups: net.lang.c
Subject: Re: register variables
Message-ID: <421@osu-eddie.UUCP>
Date: Sat, 29-Jun-85 19:55:53 EDT
Article-I.D.: osu-eddi.421
Posted: Sat Jun 29 19:55:53 1985
Date-Received: Sun, 30-Jun-85 02:16:29 EDT
References: <472@crystal.UUCP> <365@umcp-cs.UUCP>
Distribution: net
Organization: Ohio State Univ., CIS Dept., Cols, Oh.
Lines: 28

Just for the sake of information, VMS ignores register declarations and
automatically decides for itself how frequently you use each variable and
whether or not to make it a "register declaration".  I personally don't
think this is the wisest approach but after looking at a number of machine
code listings it actually appears to work well under most conditions.

> > From: shekita@crystal.UUCP
> >
> > How many variables can be declared as registers on a Vax 780? In
> > general, is there some way to tell how many register variables can
> > be declared?
> 
> Depends on the compiler.  Most Unix compilers have 6 registers on
> Vaxen (r11-r6).  VMS uses r12-r2 (!), though I don't know how their
> compiler reacts to register declarations.  Sun's C compiler has 4
> register pointers (a5-a2) and 6 register integers (d7-d2).  (I think.)
> -- 
> In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
> UUCP:	seismo!umcp-cs!chris
> CSNet:	chris@umcp-cs		ARPA:	chris@maryland

-- 
-----------------------------------
Norm Pritchett
UUCP:   cbosgd!osu-eddie!pritch
CSNET:  pritch@ohio-state
BITNET: TS0017 at OHSTVMA
MA-NET: (614) 291-8775