Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!linus!linus!faron!bs From: bs@faron.mitre.org (Robert D. Silverman) Newsgroups: comp.arch Subject: Re: isamax and instruction set design Message-ID: <1991Jun14.233032.23461@linus.mitre.org> Date: 14 Jun 91 23:30:32 GMT References: <1991Jun13.234834.22970@neon.Stanford.EDU> <1991Jun14.134338.4673@linus.mitre.org> <1991Jun14.163141.17728@rice.edu> Sender: news@linus.mitre.org (News Service) Organization: The MITRE Corporation, Bedford, MA 01730 Lines: 37 Nntp-Posting-Host: faron.mitre.org In article <1991Jun14.163141.17728@rice.edu> preston@asta.rice.edu (Preston Briggs) writes: :bs@frieda.mitre.org (Robert D. Silverman) writes: : :>: 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?? : :The RS/6000 could do this, basically assigning ibig to one of the :condition code registers. Actually, many machines could, though they don't :always have enough CC registers to be useful. However, there is STILL a problem with the above expression. absdx .le. dmax is a BOOLEAN expression. It evaluates to either TRUE or FALSE. Hence, the above code simply says to store the value TRUE or FALSE into ibig according to whether absdx is less than dmax IT DOES NOT MEAN ibig = MINIMUM(absdx, dmax) For people to do this 'conditional assignement' it would have to be: ibig = if (absdx .le. dmax) then absdx else dmax -- Bob Silverman #include Mitre Corporation, Bedford, MA 01730 "You can lead a horse's ass to knowledge, but you can't make him think"