register variables

Norman Pritchett pritch at osu-eddie.UUCP
Sun Jun 30 09:55:53 AEST 1985


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 at 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 at umcp-cs		ARPA:	chris at maryland

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



More information about the Comp.lang.c mailing list