Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/3/84 (WLS Mods); site astrovax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!princeton!astrovax!wls From: wls@astrovax.UUCP (William L. Sebok) Newsgroups: net.arch Subject: Re: Arbitrary byte alignment Message-ID: <475@astrovax.UUCP> Date: Sat, 20-Oct-84 16:10:13 EDT Article-I.D.: astrovax.475 Posted: Sat Oct 20 16:10:13 1984 Date-Received: Sun, 21-Oct-84 14:52:18 EDT References: <470@houxl.UUCP> <420@intelca.UUCP> <1745@sun.uucp> Organization: Princeton Univ. Astrophysics Lines: 28 > > I sure > > wish some of todays processors were so talented and didn't need > > such archaic things such as byte, and word alignment with bytes > > fixed at 8 bits. > > --Chuck > > I thought people (even at Intel :-) ) would know by now that the 68020 > has even better bit-string-manipulation facilities than the DEC 10/20. > The 10's required the bit string to fit in a single memory word; the > 68020 allows totally arbitrary alignment. The 68020 also takes a byte > address as the base, and adds a 32-bit signed bit number; if you don't > need the byte addressas e.g. an array base, you can still address up to > 2Gbits or 256Mbytes with simple sequential bit numbers (easy for > hardware since the word size is a power of 2). There are 8 > instructions that work with such bitfields: load (signed & unsigned), > store, set (to ones), clear, invert, test, and find-first-one-bit. Since no one has mentioned it yet I think that I should say that the Vax also has such bit string instructions that let one address a bit string of 1 to 32 bits with arbitrary alignment with respect to word boundaries. A bit address consists of a byte address base and a signed 32 bit offset from the base. Instructions provided are FFS (find first bit set), FFC (find first bit clear, EXTV (extract bit field sign extended), EXTVZ (extract bit field zero extended), CMPV (compare sign extended bit field to integer), CMPVZ (compare zero extended bit field to integer), and INSV (move integer to bit field). -- Bill Sebok Princeton University, Astrophysics {allegra,akgua,burl,cbosgd,decvax,ihnp4,noao,princeton,vax135}!astrovax!wls