Newsgroups: comp.arch Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!hybrid!scifi!bywater!uunet!kithrup!sef From: sef@kithrup.COM (Sean Eric Fagan) Subject: Re: new instructions Organization: Kithrup Enterprises, Ltd. Date: Thu, 23 May 1991 08:42:58 GMT Message-ID: <1991May23.084258.5062@kithrup.COM> References: <1991May22.001620.751@craycos.com> In article <1991May22.001620.751@craycos.com> rh@craycos.com (Robert Herndon) writes: >but population count and leading zero count >on a word value are quite useful, yet (though I'm not a compiler writer) >I can't think of easy methods for a (non-vector) compiler to use these >instructions often. You can do pop count quite quickly with table lookup. Yes, you have to break it up, but, on a byte-addressable machine, it's not a major hassle. You will need a 256-byte table, of course, but that, also, isn't a major hassle. CLZ I can also do somewhat quickly with table lookup on a byte-addressable machine. -- Sean Eric Fagan | "I made the universe, but please don't blame me for it; sef@kithrup.COM | I had a bellyache at the time." -----------------+ -- The Turtle (Stephen King, _It_) Any opinions expressed are my own, and generally unpopular with others.