Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!ucbcad!ucbvax!hplabs!pyramid!voder!apple!baum From: baum@apple.UUCP Newsgroups: comp.arch,comp.lang.c Subject: Re: String Processing Instruction Message-ID: <563@apple.UUCP> Date: Wed, 25-Mar-87 21:24:19 EST Article-I.D.: apple.563 Posted: Wed Mar 25 21:24:19 1987 Date-Received: Fri, 27-Mar-87 07:03:27 EST References: <15292@amdcad.UUCP> Reply-To: baum@apple.UUCP (Allen Baum) Organization: Apple Computer, Inc. Lines: 26 Xref: utgpu comp.arch:664 comp.lang.c:1334 -------- [] > >One unique feature of the Am29000 architecture is a special instruction. >This instruction is intended to be used to speed-up string processing, >but my guess is that other uses will be discovered. The instruction is >called "compare-bytes" and works like this:..... The HP Spectrum has three instructions that are very similar. Unit XOR will Exlusive-OR two registers and let you skip if any byte or halfword is equal or not equal. Unit AddComplement[&Trap on Condition] will add the ones complement of one register to another. This is sort of subtraction without the forced carry. That way, all bytes, halfwords & nibbles essentially have the same carry-in (although a carry out of one stage could force a carry-in to another, it turns out this doesn't affect the major uses of the instruction). Then, either a trap will occur or the next instruction will be skipped if the conditions are met. The conditions are any halfword/ byte/nibble carry, any halfword/byte zero, and their complements. Among other things, these instructions can be used for string searching a word at a time, decimal/byte/halfword range checking/validation a byte at a time, and decimal addition pre-biasing. -- {decwrl,hplabs,ihnp4}!nsc!apple!baum (408)973-3385