Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!pyrltd!pyra.co.uk!tonys From: tonys@pyra.co.uk (Tony Shaughnessy) Newsgroups: comp.arch Subject: Re: isamax and instruction set design Message-ID: <677323133.AA763@flaccid> Date: 19 Jun 91 09:18:53 GMT References: <396@validgh.com> <1991Jun13.234834.22970@neon.Stanford.EDU> <1991Jun14.134338.4673@linus.mitre.org> <1991Jun14.163141.17728@rice.edu> <64739@bbn.BBN.COM> Sender: news@pyra.co.uk (News system) Reply-To: tonys@pyra.co.uk (Tony Shaughnessy) Organization: Pyramid Technology Ltd, Farnborough, ENGLAND Lines: 23 In article <64739@bbn.BBN.COM> slackey@BBN.COM (Stan Lackey) writes: > >I once worked on a machine that had instructions like x=min(y,z) in hardware. >Also there were vector instructions that would elementwise compare vectors >and build a vector of logicals which could be applied to a subsequent vector >op. So a loop of the form > > where (a(i) .lt. b(i)) c(i) = d(i) + e(i) > >could be done with two vector instructions and no branches (other than >loop control, of course). > >-Stan How many cycles would it take to run each of these instructions? If it would take many cycles, then wouldn't this dominate any expense incurred in taking a branch, or are there other reasons for avoiding a branch? -- Tony Shaughnessy tonys@pyra.co.uk "Pedal away those tag-nut blues"