Path: utzoo!utgpu!attcan!uunet!convex!mozart!loeliger From: loeliger@mozart.uucp (Jon Loeliger) Newsgroups: comp.arch Subject: Re: Leading zero and pop count Summary: Convex C1 and C2 have both Message-ID: <705@convex.UUCP> Date: 10 Nov 88 04:15:43 GMT References: <10882@hall.cray.com> Sender: news@convex.UUCP Reply-To: loeliger@convex.com (Jon Loeliger) Organization: Convex Lines: 29 In article <10882@hall.cray.com> pmk@hall.cray.com (Peter Klausler) writes: >Population count can be handy when applied to vector masks. >After constructing an iota vector from a mask, the pop count gives you >its length. > >I've never seen these useful operations in another architecture, though. >Have you? I'd be interested in hearing about it. I'm ignorant of HW design, >but they can't be too hard to implement. > >-Peter Klausler / Cray Research compiler development / Mendota Heights, MN Yep, they are used elsewhere. Convex C1 and C2 both have trailing-zero-count and population counts. There is actually an esoteric reason to prefer a leading zero count over a trailing count.... If I'm not mistaking, there is also now a leading-ones-place instruction microcoded into the C2 set. Disclaimer: I'm not a hardware jock, just a compiler weenie... jdl ------------------------------------------------------------------------------ Jon Loeliger loeliger@convex.com Convex Computer Corporation "You should never attack an anarchist. He 701 N Plano, Richardson, TX 75081 has nothing to lose." Joe Bob's friend ------------------------------------------------------------------------------ Jon Loeliger loeliger@convex.com Convex Computer Corporation "You should never attack an anarchist. He 701 N Plano, Richardson, TX 75081 has nothing to lose." Joe Bob's friend