register variables

Brent Rector brent at cadovax.UUCP
Wed Jul 3 05:47:52 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



More information about the Comp.lang.c mailing list