Newsgroups: comp.arch Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!linus!linus!frieda!bs From: bs@frieda.mitre.org (Robert D. Silverman) Subject: Re: More on Linpack pivoting: isamax and instruction set design Message-ID: <1991Jun14.134338.4673@linus.mitre.org> Sender: news@linus.mitre.org (News Service) Nntp-Posting-Host: frieda.mitre.org Organization: The MITRE Corporation, Bedford, MA 01730 References: <396@validgh.com> <1991Jun13.234834.22970@neon.Stanford.EDU> Date: Fri, 14 Jun 1991 13:43:38 GMT In article <1991Jun13.234834.22970@neon.Stanford.EDU> andy@DEC-Lite.Stanford.EDU (Andy Freeman) writes: :In article <396@validgh.com> dgh@validgh.com (David G. Hough on validgh) writes: :> do 30 i = 2,n :> if(abs(dx(i)).le.dmax) go to 30 :> isamax = i :> dmax = abs(dx(i)) :> 30 continue : :One instruction that can eliminate the conditional branch is ^^^^^^^^^^^^ :conditional assignment. (It is unclear whether it should be a 3 in 1 : do 30 i = 2, n : absdx = abs(dx(i)) : ibig = absdx .le. dmax ^^^^^^^^^^^^^^^^^^^^^^^^ I would be very interested in seeing the assembler code that gets emitted for this line of Fortran. How can this statement get executed WITHOUT a branch?? I also have never seen a machine that has conditional assignment implemented as an instruction! (As indicated above). What machine is this? Could you show us the assembler syntax?? I ** believe ** that the above conditional assignment will get compiled into a test and branch. I don't know of any machine that provides instructions to do otherwise. It doesn't appear to the Fortan programmer to be a branch because the branch is 'hidden'. Of course, I could be wrong. -- Bob Silverman #include Mitre Corporation, Bedford, MA 01730 "You can lead a horse's ass to knowledge, but you can't make him think"