Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: gah4 Newsgroups: comp.compilers Subject: Re: Looking for a garbage collection paper Date: Thu, 29 Sep 2022 21:10:30 -0700 (PDT) Organization: Compilers Central Lines: 38 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-09-022@comp.compilers> References: <22-09-011@comp.compilers> <22-09-012@comp.compilers> <22-09-013@comp.compilers> <22-09-014@comp.compilers> <22-09-016@comp.compilers> Mime-Version: 1.0 Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="34306"; mail-complaints-to="abuse@iecc.com" Keywords: parallel, comment Posted-Date: 30 Sep 2022 00:40:56 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <22-09-016@comp.compilers> Xref: csiph.com comp.compilers:3174 On Thursday, September 29, 2022 at 10:15:49 AM UTC-7, Thomas Koenig wrote: (snip) >> > It also > >> says "a single instruction". I don't think that > >> cur_col = (cur_col + 1) mod 3 > >> can be implemented in a single instruction in common hardware. (snip, I wrote) > > It would seem more likely on a machine with a word size a > > multiple of 3, with 36 bit words not so rare 50 years ago. (snip) > What about > > int a[] = {1, 2, 0}; > > cur_col = a[cur_col]; > > That would qualify as a single indexed load, provided cur_col > started out with a value between 0 and 2. > [Duh, of course that will work on any word addressed machine. -John] A word addressed machine with an indexed load. Or a machine with indexed load that scales for the size, like VAX. Or a table of bytes, so the index unit is 1. But not if index registers are different from other registers, like (if I remember) they are on the 7090. [Yes, the 704 series had separate index registers. It occurs to me that another way to do this is to use the rotate instructions the 70x and PDP-6/10 had. Since the word is 36 bits, you rotate by 12 each time and you'll have three bit patterns. -John]