VAX 4.2bsd cc question

Bill Vaughn bill at ur-cvsvax.UUCP
Fri Mar 14 13:22:32 AEST 1986


After looking at the assembler output of several programs I have
profiled recently, I noticed that the VAX 4.2 C compiler doesn't ever
use registers r5-r2.  I've obtained a 50% increase in some of my
programs by hand editing these programs in order to use these registers.
Does anybody know whether there is are enhancements to 4.2's C
compiler (for the VAX) which use the machine's hardware more efficiently?

It seems that there are some 31 instructions on the VAX which return
results in registers r5 to r0.  The VAX C compiler, as far as I can
tell, only uses one of these: MOVC3.  I seems that that would be
an easy restriction to work around by, say, inserting a PUSHR and POPR
around the MOVC3 instruction.

Can anybody help me with this? I have neither the time nor inclination
to start trying to understand what goes on inside c2[012].c.
If there are sufficient replies, I'll post to the net.

In the meantime, I'm relegated to using a few sed scripts and some hand
editing to complete the work of /lib/c2 (at least in those programs where
it does some good).

Bill Vaughn
rochester!ur-cvsvax!bill
bill%ur-cvsvax at rochester.arpa



More information about the Comp.lang.c mailing list