Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!pyramid!hplabs!otter!kers From: kers@otter.hple.hp.com (Christopher Dollin) Newsgroups: comp.arch Subject: Re: Auto-shifted registers Message-ID: <780006@otter.hple.hp.com> Date: 23 Feb 88 07:53:53 GMT References: <1370@vaxb.calgary.UUCP> Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 34 "radford@calgary.UUCP (Radford Neal)" says |Several instruction sets, such as the 68020 and the VAX, have |an "indexed" addressing mode, in which a register is shifted |left by 0, 1, 2, or 3 bits before being added to a displacement, |allowing easy access to arrays of ints, etc. | |I has occurred to me that this "auto-shifting" might be useful |for ALL register references. Every reference to a register as |a source operand would be accompanied by two bits giving a |shift amount - equivalet to a multiplication by 1, 2, 4, or 8. The Acorn Risc Machine has some of this. The data manipulation instructions have the general form Target := Source1 Op Source2 where Target and Source1 are registers, and Source2 can be an immediate value (an 8-bit field on an even bit boundary) or a register shifted left, right (logical or arithmetic), or rotated right, either by a small constant (0..31) or by the content of another register (this adds an extra cycle). The simple load/store instructions compute the memory address as Base {+|-} {12Bit | Register_with_Shift} 12Bit is a 12bit byte offset, RegisterWithShift is a register possibly shifted (left/right (log/arith), rotated right) by a constant 0..31 (the register case was eliminated from the second-generation chip as no-one ever used it and they saved some chip area). Regards, Kers | "Why Lisp if you can talk Poperly?"