Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site alberta.UUCP Path: utzoo!utcsri!ubc-vision!alberta!bjorn From: bjorn@alberta.UUCP (Bjorn R. Bjornsson) Newsgroups: net.arch Subject: Re: What I miss in micro-processors (fairly long) Message-ID: <639@alberta.UUCP> Date: Wed, 11-Sep-85 21:47:00 EDT Article-I.D.: alberta.639 Posted: Wed Sep 11 21:47:00 1985 Date-Received: Thu, 12-Sep-85 02:42:36 EDT References: <796@kuling.UUCP> <1713@orca.UUCP> <1517@umcp-cs.UUCP> Organization: U. of Alberta, Edmonton, AB Lines: 54 In article <1713@orca.UUCP> jans@orca.UUCP (Jan Steinman) writes >..................... If stack space-optimal, write a macro that >sticks the PC in a register, then jumps. > >Guess what I'm really trying to say is that I don't see enough use for either >of these things to justify the effort needed to put them in. Gunnar's point (and rightly so) was that this takes more space and time than a dedicated instruction. A dedicated instruction may dramatically shift the space/time tradeoff of inline expansion (greater space, greater speed) versus local call (less space, less speed) in favor of the latter. >My favorite peeve is a rather restricted one, as yours are. I write >interpreters and would love a multi-way, in-line, absolute indexed branch. >Both VAX and National came so close, but their CASE instructions are PC >relative, and must be a constant distance from the routines (VAX) or jump >table (National). This means in-line coding of the routine dispatcher is not >possible with this instruction. It would be so nice to end each routine with >a CASE (R7),TABLE and have control passed to the routine who's address is at >TABLE+R7*size. So your favourite peeve is more valid than Gunnar's, why don't you take your own advice and: ashl $2,r7,r7 jmp TABLE(r7) You could even arrange things, such that the multiplication of r7 by four is eliminated, and get away with: jmp TABLE(r7) In the VAX the location of the table is fixed with respect to the case instruction, but the table contains displacements (ie relative to pc/and table), whereas the the ns32000 case instruction is really just a vanilla branch instruction that allows the full complement of ns32000 addressing modes. In article <1517@umcp-cs.UUCP> chris@umcp-cs.UUCP (Chris Torek) writes: >> ... It would be so nice to end each routine with a CASE (R7),TABLE >> and have control passed to the routine who's address is at TABLE+R7*size. > >How about > > movl table[r7],pc > >or something like that? "something like that", ie. register mode use of the pc, produces unpredictable results on VAX processors. Bjorn R. Bjornsson ihnp4!alberta!bjorn