register variables

Eugene D. Brooks III brooks at lll-crg.ARPA
Tue Jul 2 14:13:02 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.

The Tartan C compiler for vaxen seems to do equally well with register
allocation for frequently used variables.  I don't know if they pay any
attention to register declarations.

Forced register declarations are useful in their own right.  Sometimes
its its quite convenient to use register declarations and asm statements
here and there to cheat the compiler.  It certainly beats writing whole
modules in assembler.

YEA! I KNOW! All you people out there in netland are saying "GAG ME WITH
A SPOON!"  For sure, for sure.



More information about the Comp.lang.c mailing list