Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!amdcad!crackle!tim From: tim@crackle.amd.com (Tim Olson) Newsgroups: comp.arch Subject: Re: RISC v. CISC --more misconceptions Message-ID: <23449@amdcad.AMD.COM> Date: 2 Nov 88 18:34:56 GMT References: <156@gloom.UUCP> <18931@apple.Apple.COM> <40@sopwith.UUCP> <998@l.cc.purdue.edu> <7575@aw.sei.cmu.edu> Sender: news@amdcad.AMD.COM Reply-To: tim@crackle.amd.com (Tim Olson) Organization: Advanced Micro Devices, Inc. Sunnyvale CA Lines: 19 Summary: Expires: Sender: Followup-To: In article <7575@aw.sei.cmu.edu> firth@bd.sei.cmu.edu (Robert Firth) writes: | In article <998@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes: | >There are many other operations which are cheap in hardware and expensive in | >software...I will toss in a few for starters. | | > Find the distance to the next one in a bit stream FAST. It would | >be good to have an exception handler if one is not found. I am considering | >algorithms not worth implementing if the operation is slow. | | This is implemented in hardware on the MC68020 by the 'BFFFO' instruction. | It takes 18 cycles to find the first bit in a 32-bit register, and upto | 32 cycles to find the first bit in a 32-bit bitfield in memory. "hardware"? Well, microcode anyway. If it were implemented in hardware, it can be done in a single cycle, as it is on the Am29000 with the CLZ (Count Leading Zeros) instruction. -- Tim Olson Advanced Micro Devices (tim@crackle.amd.com)