Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site axiom.UUCP Path: utzoo!watmath!clyde!floyd!cmcl2!philabs!linus!axiom!smk From: smk@axiom.UUCP (Steven M. Kramer) Newsgroups: net.arch,net.lang.c Subject: Re: RISC perspective Message-ID: <544@axiom.UUCP> Date: Thu, 15-Mar-84 02:29:16 EST Article-I.D.: axiom.544 Posted: Thu Mar 15 02:29:16 1984 Date-Received: Sat, 17-Mar-84 02:39:45 EST References: <27900009@ucbesvax.UUCP> <26@utastro.UUCP> <1797@rlgvax.UUCP> Organization: Axiom Technology, Newton MA Lines: 18 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@mitre-bedford (MIL)