register variables

eric stern at bnl.UUCP
Mon Jul 8 06:45:58 AEST 1985


> In article <421 at osu-eddie.UUCP> pritch at osu-eddie.UUCP (Norman Pritchett) writes:
> >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.
> >
> >Norm Pritchett
> >UUCP:   cbosgd!osu-eddie!pritch
> 
> So what happens then if you are frequently referencing a memory mapped
> device register, will the VMS compiler cache the first reference in a
> register?  (Note that I am aware of the proposed 'volatile' definition
> in the standard).  Or can you tell the compiler to listen to register
> definitions in certain cases.
> 
> -- 
> --------------------------------------------------------------
> Brent E. Rector - CONTEL CADO, Torrance, CA
> { decvax, hplabs, ihnp4, ucbvax, sdcrdcf }!trwrb!cadovax!brent
> 					 philabs!cadovax!brent

The VAX-11C compiler already supports volatile declarations, as
well as variables defined in readonly storage.  In addition,
to avoid allocating program sections (of which there are a
limited number), You can define entry points in your program,
and reference entry points in other programs.  This last feature
is only of use under VMS, since the concept of external names
is totally different between VMS and Unix.


					Eric Stern
					stern at bnl.arpa
					stern at bnl.bitnet
					stern at bnldag.bitnet (new)
					...!philabs!sbcs!bnl!stern



More information about the Comp.lang.c mailing list