RISC perspective

Steven M. Kramer smk at axiom.UUCP
Thu Mar 15 17:29:16 AEST 1984


You have to take into acct :
	1) # of reg assignment allowed on your machine,
	2) cost in terns of saving/restoring regs
as Guy Harris said.  I usually order my reg so tthat the most used variable
comes first, so that if my program were ported to a PDP-11, it would
still run sort of fast.  I know that's sort of implementation dependent, but
all optimization is that way.  On the 68000 port we are using, there is
a difference between address resgister and data registers that ALSO must
be taken into consideration.  On the VAX and PDP that's not so, but
using rigister in any machine should keep in mind all of the differences.
The best code would #ifdef the differences (especially if another processor
handled things differently), but few of us (I don't, I can't anticipate
all uses) think that way.  So, each new port has to look a register
declarations.  Few even use them to begin with. so ANY use is a plus.
-- 
	--steve kramer
	{allegra,genrad,ihnp4,utzoo,philabs,uw-beaver}!linus!axiom!smk	(UUCP)
	linus!axiom!smk at mitre-bedford					(MIL)



More information about the Comp.lang.c mailing list